protected function ImageCaptchaWebTestCase::getCaptchaImageFromForm in CAPTCHA 7
Helper function to get the CAPTCHA image element from the current form.
1 call to ImageCaptchaWebTestCase::getCaptchaImageFromForm()
- ImageCaptchaWebTestCase::assertNonEmptyImage in image_captcha/
image_captcha.test - Asserts that the image URL actually returns an image.
File
- image_captcha/
image_captcha.test, line 25 - Tests for the Image CAPTCHA module.
Class
- ImageCaptchaWebTestCase
- @file Tests for the Image CAPTCHA module.
Code
protected function getCaptchaImageFromForm() {
$elements = $this
->xpath('//input[@name="captcha_sid"]/../img');
return $elements[0];
}