/** * @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('</p><p>'); $element->setDecorators(array(array('ViewHelper', array('separator' => '')), array('HtmlTag', array('tag' => 'p')))); $expected = '<p><label><input type="radio" name="foo" id="foo-foo" value="foo">Foo</label></p>' . '<p><label><input type="radio" name="foo" id="foo-bar" value="bar">Bar</label></p>'; $actual = $element->render($this->getView()); $this->assertEquals($expected, $actual); }
/** * @group ZF-11517 */ public function testRenderingWithIndividualDecoratorsAsConstructorOptionsWithoutLabel() { $element = new Zend_Form_Element_Radio(array('name' => 'foo', 'multiOptions' => array('bar' => 'Bar', 'baz' => 'Baz'), 'decorators' => array('ViewHelper'))); $html = $element->render($this->getView()); $this->assertNotContains('<dt id="foo-label"> </dt>', $html); }