ConfigTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructCreatesUsefulMessage() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Framework\Exception;
6
7
use PHPUnit\Framework\TestCase;
8
9
class ConfigTest extends TestCase
10
{
11
    public function testConstructCreatesUsefulMessage(): void
12
    {
13
        $className = '\Foo';
14
        $relatedEnvVars = ['bar' => 'baz'];
15
16
        $sut = new Config($className, $relatedEnvVars);
17
18
        $this->assertSame(
19
            'Insufficient configs found while resolving dependency: \Foo (Related environment variables: baz)',
20
            $sut->getMessage()
21
        );
22
    }
23
}
24