From e124b41977504067f6e1b6b3bf2e39c9b1d31324 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 8 Oct 2019 13:57:50 +0200 Subject: Tests: TestCase: Initialize $this->app on every run --- tests/Unit/TestCase.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/Unit/TestCase.php') 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__ . '/../../'); + } } -- cgit v1.3.1