Passed
Pull Request — master (#54)
by Jesús
02:44
created

IntegrationTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Integration\Framework\MissingFile;
6
7
use Gacela\Framework\ClassResolver\Config\ConfigNotFoundException;
8
use Gacela\Framework\ClassResolver\DependencyProvider\DependencyProviderNotFoundException;
9
use Gacela\Framework\ClassResolver\Factory\FactoryNotFoundException;
10
use Gacela\Framework\Container\Exception\ContainerKeyNotFoundException;
11
use Gacela\Framework\Gacela;
12
use PHPUnit\Framework\TestCase;
13
14
final class IntegrationTest extends TestCase
15
{
16
    public function setUp(): void
17
    {
18
        Gacela::bootstrap(__DIR__);
19
    }
20
21
    public function test_missing_factory_module(): void
22
    {
23
        $this->expectException(FactoryNotFoundException::class);
24
25
        $facade = new MissingFactoryFile\Facade();
26
        $facade->error();
27
    }
28
29
    public function test_missing_config_module(): void
30
    {
31
        $this->expectException(ConfigNotFoundException::class);
32
33
        $facade = new MissingConfigFile\Facade();
34
        $facade->error();
35
    }
36
37
    public function test_missing_dependency_provider_module(): void
38
    {
39
        $this->expectException(DependencyProviderNotFoundException::class);
40
41
        $facade = new MissingDependencyProviderFile\Facade();
42
        $facade->error();
43
    }
44
45
    public function test_missing_container_service_key_module(): void
46
    {
47
        $this->expectException(ContainerKeyNotFoundException::class);
48
49
        $facade = new MissingContainerServiceKey\Facade();
50
        $facade->error();
51
    }
52
}
53