ConfigProviderTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A configIsCorrect() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AcelayaTest\ExpressiveErrorHandler;
6
7
use Acelaya\ExpressiveErrorHandler\ConfigProvider;
8
use PHPUnit\Framework\TestCase;
9
10
class ConfigProviderTest extends TestCase
11
{
12
    /** @var ConfigProvider */
13
    protected $configProvider;
14
15
    public function setUp(): void
16
    {
17
        $this->configProvider = new ConfigProvider();
18
    }
19
20
    /**
21
     * @test
22
     */
23
    public function configIsCorrect(): void
24
    {
25
        $config = $this->configProvider->__invoke();
26
        $this->assertCount(2, $config);
27
        $this->assertArrayHasKey('dependencies', $config);
28
        $this->assertArrayHasKey('error_handler', $config);
29
    }
30
}
31