Passed
Pull Request — master (#186)
by Jesús
06:27 queued 03:12
created

FeatureTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 12
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\GacelaConfigAddAppConfigKeyValues;
6
7
use Gacela\Framework\Bootstrap\GacelaConfig;
8
use Gacela\Framework\Gacela;
9
use GacelaTest\Feature\Framework\GacelaConfigAddAppConfigKeyValues\Module\Facade;
10
use PHPUnit\Framework\TestCase;
11
12
final class FeatureTest extends TestCase
13
{
14
    public function setUp(): void
15
    {
16
        Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void {
17
            $config->addAppConfigKeyValue('first_key', 'individual config key-value');
18
19
            $config->addAppConfigKeyValues([
20
                'some_key' => 'some value',
21
                'another_key' => 'another value',
22
                'override_key' => 'i am going to be overrided',
23
            ]);
24
25
            $config->addAppConfigKeyValue('override_key', 'truly override'); // it overrides previous 'override_key' key
26
        });
27
    }
28
29
    public function test_application_config_are_added_from_gacela_config(): void
30
    {
31
        $facade = new Facade();
32
33
        self::assertSame([
34
            'first_key' => 'individual config key-value',
35
            'some_key' => 'some value',
36
            'another_key' => 'another value',
37
            'override_key' => 'truly override',
38
        ], $facade->getConfigData());
39
    }
40
}
41