Passed
Pull Request — master (#55)
by Jesús
03:20
created

test_mapping_anon_class_callable()   A

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
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Integration\Framework\UsingConfigInterfacesMapping;
6
7
use Gacela\Framework\Gacela;
8
use PHPUnit\Framework\TestCase;
9
10
final class IntegrationTest extends TestCase
11
{
12
    private LocalConfig\Facade $facade;
13
14
    public function setUp(): void
15
    {
16
        Gacela::bootstrap(__DIR__, ['isWorking?' => 'yes!']);
17
        $this->facade = new LocalConfig\Facade();
18
    }
19
20
    public function test_mapping_interfaces_from_config(): void
21
    {
22
        self::assertSame(
23
            'Hello Gacela! Name: Chemaclass & Jesus',
24
            $this->facade->generateCompanyAndName()
25
        );
26
    }
27
28
    public function test_resolved_class(): void
29
    {
30
        self::assertSame(
31
            [
32
                'bool' => true,
33
                'string' => 'string',
34
                'int' => 1,
35
                'float' => 1.2,
36
                'array' => ['array'],
37
            ],
38
            $this->facade->generateResolvedClass()
39
        );
40
    }
41
42
    public function test_mapping_anon_class_callable(): void
43
    {
44
        self::assertSame(
45
            [true, 'string', 1, 1.2, ['array']],
46
            $this->facade->generateTypesAnonClassCallable()
47
        );
48
    }
49
50
    public function test_mapping_anon_class_function(): void
51
    {
52
        self::assertSame(
53
            [true, 'string', 1, 1.2, ['array']],
54
            $this->facade->generateTypesAnonClassFunction()
55
        );
56
    }
57
58
    public function test_mapping_abstract_anon_class_callable(): void
59
    {
60
        self::assertSame(
61
            [true, 'string', 1, 1.2, ['array']],
62
            $this->facade->generateAbstractTypesAnonClassCallable()
63
        );
64
    }
65
66
    public function test_mapping_abstract_anon_class_function(): void
67
    {
68
        self::assertSame(
69
            [true, 'string', 1, 1.2, ['array']],
70
            $this->facade->generateAbstractTypesAnonClassFunction()
71
        );
72
    }
73
}
74