Index: tests/Zend/View/Helper/FormRadioTest.php =================================================================== --- tests/Zend/View/Helper/FormRadioTest.php (revision 24786) +++ tests/Zend/View/Helper/FormRadioTest.php (working copy) @@ -384,25 +384,26 @@ $this->assertNotContains('style="white-space: nowrap;"', $html); } - public function testRadioLabelContainsForAttributeTag() + /** + * @group ZF-8709 + */ + public function testRadioLabelContainsNotForAttributeTag() { - $options = array( - 'foo bar' => 'Foo', - 'bar baz' => 'Bar', - 'baz' => 'Baz' + $actual = $this->helper->formRadio( + array( + 'name' => 'foo', + 'options' => array( + 'bar' => 'Bar', + 'baz' => 'Baz' + ), + ) ); - $html = $this->helper->formRadio(array( - 'name' => 'foo[bar]', - 'value' => 'bar', - 'options' => $options, - )); - require_once 'Zend/Filter/Alnum.php'; - $filter = new Zend_Filter_Alnum(); - foreach ($options as $key => $value) { - $id = 'foo-bar-' . $filter->filter($key); - $this->assertRegexp('/]*)(for="' . $id . '")/', $html); - } + $expected = '
' + . "\n" + . ''; + + $this->assertSame($expected, $actual); } /** @@ -422,7 +423,6 @@ $html = $formRadio->formRadio($name, -1, null, $options); foreach ( $options as $key=>$value ) { $fid = "{$name}-{$key}"; - $this->assertRegExp('/]*)(for="'.$fid.'")/', $html); $this->assertRegExp('/]*)(id="'.$fid.'")/', $html); }