FeatureTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A test_mapping_interfaces_from_config() 0 5 1
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