FeatureTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_load_default_config() 0 11 1
A setUp() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\UsingConfigWithBootstrapSetup;
6
7
use Gacela\Framework\Bootstrap\GacelaConfig;
8
use Gacela\Framework\Gacela;
9
use PHPUnit\Framework\TestCase;
10
11
final class FeatureTest extends TestCase
12
{
13
    protected function setUp(): void
14
    {
15
        $configFn = static function (GacelaConfig $config): void {
16
            $config->resetInMemoryCache();
17
            $config->addAppConfig('custom-config.php', 'custom-config_local.php');
18
        };
19
20
        Gacela::bootstrap(__DIR__, $configFn);
21
    }
22
23
    public function test_load_default_config(): void
24
    {
25
        $facade = new LocalConfig\Facade();
26
27
        self::assertSame(
28
            [
29
                'config' => 1,
30
                'config_local' => 2,
31
                'override' => 5,
32
            ],
33
            $facade->doSomething(),
34
        );
35
    }
36
}
37