summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-09-20 01:21:36 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-09-20 01:21:36 +0200
commit3141c3f8b5fd1a45d337c1f5540cb715a5a7dbbf (patch)
tree56215a3a9401ffd05b9abf18bbac05713b20625c
parent86c0713baa2f616bf1dff6d9dbe0ea68b1c00e91 (diff)
Fixed Container test
-rw-r--r--phpunit.xml1
-rw-r--r--tests/Unit/Container/ContainerTest.php6
2 files changed, 6 insertions, 1 deletions
diff --git a/phpunit.xml b/phpunit.xml
index 92dc5a5b..bdc4b0b6 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -14,7 +14,6 @@
<filter>
<whitelist>
<directory>./include/</directory>
- <directory>./public/</directory>
<directory>./src/</directory>
</whitelist>
</filter>
diff --git a/tests/Unit/Container/ContainerTest.php b/tests/Unit/Container/ContainerTest.php
index f0ba24e7..89c34209 100644
--- a/tests/Unit/Container/ContainerTest.php
+++ b/tests/Unit/Container/ContainerTest.php
@@ -85,6 +85,12 @@ class ContainerTest extends TestCase
*/
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();
$container = Container::getInstance();