Completed
Pull Request — master (#454)
by Alejandro
14:47
created

ConfigProviderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
dl 0
loc 17
rs 10
c 1
b 0
f 0

2 Methods

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