Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class FeatureTest extends TestCase |
||
11 | { |
||
12 | public function tearDown(): void |
||
13 | { |
||
14 | # Remove the APP_ENV |
||
15 | putenv('APP_ENV'); |
||
16 | } |
||
17 | |||
18 | public function test_load_config_from_custom_env_default(): void |
||
19 | { |
||
20 | Gacela::bootstrap(__DIR__); |
||
21 | |||
22 | $facade = new LocalConfig\Facade(); |
||
23 | |||
24 | self::assertSame( |
||
25 | [ |
||
26 | 'key' => 'from:default', |
||
27 | ], |
||
28 | $facade->doSomething() |
||
29 | ); |
||
30 | } |
||
31 | |||
32 | public function test_load_config_from_custom_env_dev(): void |
||
33 | { |
||
34 | self::markTestSkipped('TODO'); |
||
35 | putenv('APP_ENV=dev'); |
||
36 | |||
37 | Gacela::bootstrap(__DIR__); |
||
38 | |||
39 | $facade = new LocalConfig\Facade(); |
||
40 | |||
41 | self::assertSame( |
||
42 | [ |
||
43 | 'key' => 'from:dev', |
||
44 | ], |
||
45 | $facade->doSomething() |
||
46 | ); |
||
47 | } |
||
48 | |||
49 | public function test_load_config_from_custom_env_prod(): void |
||
63 | ); |
||
64 | } |
||
65 | } |
||
66 |