We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class DiContainerTest extends TestCase { |
||
14 | private const PHPDI_COMPILED_CONTAINER_FILE = "/tmp/CompiledContainer.php"; |
||
15 | |||
16 | protected function setup(): void { |
||
17 | if (file_exists(self::PHPDI_COMPILED_CONTAINER_FILE)) { |
||
18 | unlink(self::PHPDI_COMPILED_CONTAINER_FILE); |
||
19 | } |
||
20 | } |
||
21 | |||
22 | public function test_compilation_enabled_true() { |
||
23 | // Given environment variable is turned off |
||
24 | unset($_ENV["DISABLE_PHPDI_COMPILATION"]); |
||
25 | // And the container is built |
||
26 | DiContainer::initializeContainer(); |
||
27 | // Then |
||
28 | self::assertFileExists(self::PHPDI_COMPILED_CONTAINER_FILE); |
||
29 | } |
||
30 | |||
31 | public function test_compilation_enabled_false() { |
||
38 | } |
||
39 | } |
||
40 |