Permalink
Browse files

Fix test to handle different input tag rendering because of different…

… doctypes
  • Loading branch information...
jbenoit2011 committed Dec 14, 2014
1 parent d64d9d8 commit edf3f0becb6806b3294a3734cf885393d0de0a6b
Showing with 7 additions and 3 deletions.
  1. +7 −3 tests/ZendTest/Form/View/Helper/FormRowTest.php
@@ -435,17 +435,21 @@ public function testWrapFieldsetAroundCaptchaWithLabel()
{
$captcha = Captcha::factory(array(
'class' => 'dumb'
));
));
$label = 'baz';
$element = new Element\Captcha('captcha', array(
'captcha' => $captcha,
'label' => $label
));
));
$markup = $this->helper->render($element);
$this->assertRegexp('#^<fieldset><legend>' . $label . '</legend>Please type this word backwards <b>[a-z0-9]{8}</b><input name="captcha&\#x5B;id&\#x5D;" type="hidden" value="[a-z0-9]{32}"><input name="captcha&\#x5B;input&\#x5D;" type="text"></fieldset>$#', $markup);
$this->assertRegexp('#^<fieldset><legend>' . $label . '<\/legend>'
. 'Please type this word backwards <b>[a-z0-9]{8}<\/b>'
. '<input name="captcha&\#x5B;id&\#x5D;" type="hidden" value="[a-z0-9]{32}"\/?>'
. '<input name="captcha&\#x5B;input&\#x5D;" type="text"\/?>'
. '<\/fieldset>$#', $markup);
}
}

0 comments on commit edf3f0b

Please sign in to comment.