FeatureTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 8
c 0
b 0
f 0
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A test_with_a_dependency() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\ModuleWithExternalDependencies;
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
        Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void {
16
            $config->resetInMemoryCache();
17
        });
18
    }
19
20
    /**
21
     * A module (ModuleWithDependencies\Facade) with one module-dependency (DependentModule).
22
     */
23
    public function test_with_a_dependency(): void
24
    {
25
        $facade = new Supplier\Facade();
26
27
        self::assertSame(
28
            [
29
                'Hello, Gacela from Supplier.',
30
                'Hello, Gacela from Dependent.',
31
            ],
32
            $facade->greet('Gacela'),
33
        );
34
    }
35
}
36