summaryrefslogtreecommitdiff
path: root/tests/Unit/TestCase.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-10-08 13:57:50 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2019-10-08 13:57:50 +0200
commite124b41977504067f6e1b6b3bf2e39c9b1d31324 (patch)
tree1e212ce371517e9a5edbd7225e681f79b43c8d57 /tests/Unit/TestCase.php
parent1b3e3b1d65126da909d0013c9c0a0cb3f41639c1 (diff)
Tests: TestCase: Initialize $this->app on every run
Diffstat (limited to 'tests/Unit/TestCase.php')
-rw-r--r--tests/Unit/TestCase.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/Unit/TestCase.php b/tests/Unit/TestCase.php
index e1a704d9..dba8c989 100644
--- a/tests/Unit/TestCase.php
+++ b/tests/Unit/TestCase.php
@@ -2,12 +2,16 @@
namespace Engelsystem\Test\Unit;
+use Engelsystem\Application;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Rule\InvocationOrder;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
abstract class TestCase extends PHPUnitTestCase
{
+ /** @var Application */
+ protected $app;
+
/**
* @param MockObject $object
* @param string $method
@@ -34,4 +38,12 @@ abstract class TestCase extends PHPUnitTestCase
$invocation->willReturn($return);
}
}
+
+ /**
+ * Called before each test run
+ */
+ protected function setUp(): void
+ {
+ $this->app = new Application(__DIR__ . '/../../');
+ }
}