Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 63631b6

Browse files
committed
Added test for zendframeworkGH-564
1 parent 44c44f2 commit 63631b6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/Zend/Application/ApplicationTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,33 @@ public function testConstructorShouldSetOptionsWhenProvided()
108108
$this->assertEquals($options, $application->getOptions());
109109
}
110110

111+
/**
112+
* @group GH-564
113+
* @depends testConstructorInstantiatesAutoloader
114+
*/
115+
public function testConstructorRespectsSuppressFileNotFoundWarningFlag()
116+
{
117+
$application = new Zend_Application('testing');
118+
$this->assertFalse($application->getAutoloader()->suppressNotFoundWarnings()); //Default value
119+
120+
$application = new Zend_Application('testing', null, $suppressNotFoundWarnings = true);
121+
$this->assertTrue($application->getAutoloader()->suppressNotFoundWarnings());
122+
123+
$application = new Zend_Application('testing', null, $suppressNotFoundWarnings = false);
124+
$this->assertFalse($application->getAutoloader()->suppressNotFoundWarnings());
125+
126+
$options = array(
127+
'foo' => 'bar',
128+
'bar' => 'baz',
129+
);
130+
131+
$application = new Zend_Application('testing', $options, $suppressNotFoundWarnings = true);
132+
$this->assertTrue($application->getAutoloader()->suppressNotFoundWarnings());
133+
134+
$application = new Zend_Application('testing', $options, $suppressNotFoundWarnings = false);
135+
$this->assertFalse($application->getAutoloader()->suppressNotFoundWarnings());
136+
}
137+
111138
public function testHasOptionShouldReturnFalseWhenOptionNotPresent()
112139
{
113140
$this->assertFalse($this->application->hasOption('foo'));

0 commit comments

Comments
 (0)