Fixed Container test
This commit is contained in:
parent
86c0713baa
commit
3141c3f8b5
|
@ -14,7 +14,6 @@
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./include/</directory>
|
<directory>./include/</directory>
|
||||||
<directory>./public/</directory>
|
|
||||||
<directory>./src/</directory>
|
<directory>./src/</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
|
@ -85,6 +85,12 @@ class ContainerTest extends TestCase
|
||||||
*/
|
*/
|
||||||
public function testContainerSingleton()
|
public function testContainerSingleton()
|
||||||
{
|
{
|
||||||
|
// Ensure that no container has been initialized
|
||||||
|
$reflection = new \ReflectionProperty(Container::class, 'instance');
|
||||||
|
$reflection->setAccessible(true);
|
||||||
|
$reflection->setValue(null, null);
|
||||||
|
$reflection->setAccessible(false);
|
||||||
|
|
||||||
$container0 = new Container();
|
$container0 = new Container();
|
||||||
$container = Container::getInstance();
|
$container = Container::getInstance();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue