Skip to content

Commit

Permalink
Adding unit test to the separator rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandomantoan committed Nov 20, 2012
1 parent 4c04516 commit 033ad19
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ZendTest/Form/View/Helper/Captcha/DumbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 033ad19

Please sign in to comment.