refactor test code for captcha component and vusion.php