Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding unit test to the separator rendering

  • Loading branch information...
commit 033ad19945e81ed59c90fccc46d21811cc46909b 1 parent 4c04516
@fernandomantoan authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 tests/ZendTest/Form/View/Helper/Captcha/DumbTest.php
View
9 tests/ZendTest/Form/View/Helper/Captcha/DumbTest.php
@@ -92,4 +92,13 @@ public function testSetSeparator()
$this->assertEquals('-', $this->helper->getSeparator());
}
+
+ public function testRenderSeparatorOneTimeAfterText()
+ {
+ $element = $this->getElement();
+ $this->helper->setSeparator('<br />');
+ $markup = $this->helper->render($element);
+ $this->assertContains($this->captcha->getLabel() . ' <b>' . strrev($this->captcha->getWord()) . '</b>' . $this->helper->getSeparator() . '<input name="foo[id]" type="hidden"', $markup);
+ $this->assertNotContains($this->helper->getSeparator() . '<input name="foo[input]" type="text"', $markup);
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.