Index: tests/Zend/Form/Decorator/ViewHelperTest.php =================================================================== --- tests/Zend/Form/Decorator/ViewHelperTest.php (revision 24676) +++ tests/Zend/Form/Decorator/ViewHelperTest.php (working copy) @@ -180,6 +180,62 @@ $this->assertContains($translations[$value], $test); } } + + /** + * @group ZF-9689 + */ + public function testRenderWithListSeparatorForMulticheckbox() + { + require_once 'Zend/Form/Element/Multicheckbox.php'; + + $element = new Zend_Form_Element_MultiCheckbox('foo'); + $options = array( + 'foo' => 'Foo', + 'bar' => 'Bar', + ); + $element->setMultiOptions($options); + $element->setSeparator('

'); + $element->setDecorators( + array( + array('ViewHelper', array('separator' => '')), + array('HtmlTag', array('tag' => 'p')), + ) + ); + + $expected = '

' + . '

'; + $actual = $element->render($this->getView()); + + $this->assertEquals($expected, $actual); + } + + /** + * @group ZF-9689 + */ + public function testRenderWithListSeparatorForRadio() + { + require_once 'Zend/Form/Element/Radio.php'; + + $element = new Zend_Form_Element_Radio('foo'); + $options = array( + 'foo' => 'Foo', + 'bar' => 'Bar', + ); + $element->setMultiOptions($options); + $element->setSeparator('

'); + $element->setDecorators( + array( + array('ViewHelper', array('separator' => '')), + array('HtmlTag', array('tag' => 'p')), + ) + ); + + $expected = '

' + . '

'; + $actual = $element->render($this->getView()); + + $this->assertEquals($expected, $actual); + } } class Zend_Form_Decorator_ViewHelperTest_Textarea extends Zend_Form_Element