Total Complexity | 7 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
12 | abstract class FunctionalTest extends TestCase |
||
13 | { |
||
14 | use HttpRequestCapabilities; |
||
15 | use JsonAssertions; |
||
16 | use Psr7Assertions; |
||
17 | |||
18 | private const PATH_TO_PROJECT_ROOT = __DIR__ . '/../../../'; |
||
19 | |||
20 | protected $reloadDb = true; |
||
21 | |||
22 | /** @var Container */ |
||
23 | private static $container; |
||
24 | |||
25 | protected function setUp() |
||
26 | { |
||
27 | if ($this->reloadDb) { |
||
28 | $loader = $this->getContainer()->get(FixtureLoader::class); |
||
29 | $loader->load(); |
||
30 | } |
||
31 | |||
32 | parent::setUp(); |
||
33 | } |
||
34 | |||
35 | protected function tearDown() |
||
42 | } |
||
43 | |||
44 | public function getContainer(): Container |
||
45 | { |
||
46 | if (!isset(self::$container)) { |
||
47 | self::$container = (new Bootstrap(self::PATH_TO_PROJECT_ROOT))->getContainer(); |
||
48 | } |
||
49 | |||
50 | return self::$container; |
||
51 | } |
||
52 | |||
53 | public function getFromContainer(string $id) |
||
56 | } |
||
57 | |||
58 | public function setInContainer($name, $value): void |
||
61 | } |
||
62 | } |
||
63 |