Passed
Push — add-githooks-when-composer-ins... ( 4899b7...e6a7b9 )
by Chema
05:45 queued 02:55
created

FeatureTest::test_object_factory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\StaticFactory;
6
7
use Gacela\Framework\Gacela;
8
use GacelaTest\Feature\Framework\StaticFactory\Module\Config;
9
use GacelaTest\Feature\Framework\StaticFactory\Module\Factory as TestStaticFactory;
10
use PHPUnit\Framework\TestCase;
11
12
final class FeatureTest extends TestCase
13
{
14
    public function setUp(): void
15
    {
16
        Gacela::bootstrap(__DIR__);
17
    }
18
19
    public function test_object_factory(): void
20
    {
21
        $actual = (new TestStaticFactory())->createStringFromNonStaticFactory();
22
23
        self::assertSame(Config::STR, $actual);
24
    }
25
26
    public function test_static_factory(): void
27
    {
28
        $actual = TestStaticFactory::createStringFromStaticFactory();
29
30
        self::assertSame(Config::STR, $actual);
31
    }
32
}
33