Index: FormSelectTest.php =================================================================== --- FormSelectTest.php (revision 23862) +++ FormSelectTest.php (working copy) @@ -311,6 +311,26 @@ $this->assertRegexp('/]*?(name="baz\[\]")/', $html, $html); $this->assertNotRegexp('/]*?(multiple="multiple")/', $html, $html); } + + public function testCanApplyOptionClasses() + { + $html = $this->helper->formSelect(array( + 'name' => 'baz[]', + 'options' => array( + 'foo' => 'Foo', + 'bar' => 'Bar', + 'baz' => 'Baz,' + ), + 'attribs' => array( + 'multiple' => false, + 'optionClasses' => array('foo' => 'fooClass', + 'bar' => 'barClass', + 'baz' => 'bazClass') + ), + )); + $this->assertRegexp('/.*]*?(value="foo")?(class="fooClass").*/', $html, $html); + $this->assertRegexp('/.*]*?(value="bar")?(class="barClass").*/', $html, $html); + } } // Call Zend_View_Helper_FormSelectTest::main() if this source file is executed directly.