Index: tests/Zend/Application/ApplicationTest.php =================================================================== --- tests/Zend/Application/ApplicationTest.php (revision 18161) +++ tests/Zend/Application/ApplicationTest.php (working copy) @@ -383,6 +383,38 @@ } /** + * @group ZF-7742 + */ + public function testHasOptionShouldBeCaseInsensitive() + { + $testvalue = array('foo' => 'bar'); + $options = array( + 'Test' => $testvalue + ); + $this->application->setOptions($options); + + $this->assertTrue($this->application->hasOption('test')); + $this->assertTrue($this->application->hasOption('Test')); + } + + /** + * @group ZF-7742 + */ + public function testGetOptionShouldBeCaseInsensitive() + { + $testvalue = array('foo' => 'bar'); + $options = array( + 'Test' => $testvalue + ); + $this->application->setOptions($options); + + $this->assertSame($testvalue, + $this->application->getOption('test')); + $this->assertSame($testvalue, + $this->application->getOption('Test')); + } + + /** * @group ZF-6679 */ public function testSetOptionsShouldProperlyMergeTwoConfigFileOptions() Index: library/Zend/Application.php =================================================================== --- library/Zend/Application.php (revision 18193) +++ library/Zend/Application.php (working copy) @@ -200,7 +200,7 @@ */ public function hasOption($key) { - return in_array($key, $this->_optionKeys); + return in_array(strtolower($key), $this->_optionKeys); } /**