FeatureTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies;
6
7
use Gacela\Framework\Bootstrap\GacelaConfig;
8
use Gacela\Framework\Gacela;
9
use GacelaTest\Feature\Framework\BindingInterfacesWithInnerDependencies\Module\Domain\Greeter\CorrectCompanyGenerator;
10
use PHPUnit\Framework\TestCase;
11
12
final class FeatureTest extends TestCase
13
{
14
    protected function setUp(): void
15
    {
16
        Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void {
17
            $config->resetInMemoryCache();
18
            $config->addExternalService('greeterGenerator', CorrectCompanyGenerator::class);
19
        });
20
    }
21
22
    public function test_mapping_interfaces_from_config(): void
23
    {
24
        self::assertSame(
25
            'Hello Gacela! Name: Chemaclass & Jesus',
26
            (new Module\Facade())->generateCompanyAndName(),
27
        );
28
    }
29
}
30