Total Complexity | 4 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | final class FeatureTest extends TestCase |
||
12 | { |
||
13 | public function tearDown(): void |
||
14 | { |
||
15 | # Remove the APP_ENV |
||
16 | putenv('APP_ENV'); |
||
17 | } |
||
18 | |||
19 | public function test_load_config_from_custom_env_default(): void |
||
20 | { |
||
21 | Gacela::bootstrap(__DIR__, GacelaConfig::withPhpConfigDefault()); |
||
22 | |||
23 | $facade = new LocalConfig\Facade(); |
||
24 | |||
25 | self::assertSame( |
||
26 | [ |
||
27 | 'from-default' => 1, |
||
28 | 'from-default-env-override' => 1, |
||
29 | 'from-local-override' => 4, |
||
30 | ], |
||
31 | $facade->doSomething() |
||
32 | ); |
||
33 | } |
||
34 | |||
35 | public function test_load_config_from_custom_env_dev(): void |
||
50 | ); |
||
51 | } |
||
52 | |||
53 | public function test_load_config_from_custom_env_prod(): void |
||
68 | ); |
||
69 | } |
||
71 |