Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | abstract class FunctionalTestCase extends TestCase |
||
12 | { |
||
13 | protected ?FunctionalTester $tester; |
||
14 | |||
15 | protected function setUp(): void |
||
16 | { |
||
17 | $this->tester = new FunctionalTester(); |
||
18 | } |
||
19 | |||
20 | public function mockService(string $id, mixed $definition): void |
||
21 | { |
||
22 | $this->tester?->mockService($id, $definition); |
||
23 | } |
||
24 | |||
25 | protected function bootstrapApplication(?string $projectRootPath = null): void |
||
26 | { |
||
27 | $this->tester?->bootstrapApplication($projectRootPath); |
||
28 | } |
||
29 | |||
30 | protected function doRequest(string $method, string $url): ResponseAccessor |
||
31 | { |
||
32 | return $this->tester?->doRequest($method, $url) ?? throw new Exception('Either $tester or $response is null'); |
||
33 | } |
||
34 | |||
35 | protected function getContainer(): ContainerInterface |
||
38 | } |
||
39 | } |
||
40 |