Test Setup Failed
Push — master ( f687c0...10c0b6 )
by Gabriel
12:32
created

PackageHasConfigTraitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_getPackageConfig() 0 10 1
1
<?php
2
3
namespace Nip\Config\Tests\Utils;
4
5
use Nip\Config\Tests\AbstractTest;
6
use Nip\Config\Tests\Fixtures\PackageWithConfig;
7
8
/**
9
 * Class PackageHasConfigTraitTest
10
 * @package Nip\Config\Tests\Utils
11
 */
12
class PackageHasConfigTraitTest extends AbstractTest
13
{
14
    public function test_getPackageConfig()
15
    {
16
        $package = new PackageWithConfig();
17
        $package::setConfig([
18
            'demo' => ['option1' => 1],
19
        ]);
20
21
        self::assertSame(1, $package->testConfig('option1'));
22
        self::assertSame('default', $package->testConfig('option2', 'default'));
23
    }
24
}
25