FeatureTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
c 0
b 0
f 0
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_facade_aware() 0 12 1
A setUp() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\FacadeAware;
6
7
use Gacela\Framework\Bootstrap\GacelaConfig;
8
use Gacela\Framework\Gacela;
9
use GacelaTest\Feature\Framework\FacadeAware\Module\UserInput\Command\TestHiCommand;
10
use PHPUnit\Framework\TestCase;
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\BufferedOutput;
13
14
final class FeatureTest extends TestCase
15
{
16
    protected function setUp(): void
17
    {
18
        Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void {
19
            $config->resetInMemoryCache();
20
        });
21
    }
22
23
    public function test_facade_aware(): void
24
    {
25
        $output = new BufferedOutput();
26
27
        $hiCommand = new TestHiCommand();
28
29
        $hiCommand->run(
30
            $this->createStub(InputInterface::class),
31
            $output,
32
        );
33
34
        self::assertSame('Hi', $output->fetch());
35
    }
36
}
37