Completed
Pull Request — master (#47)
by David
01:40
created

EmptyContainerTest::testContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace TheCodingMachine\GraphQL\Controllers\Containers;
4
5
use PHPUnit\Framework\TestCase;
6
use Psr\Container\NotFoundExceptionInterface;
7
8
class EmptyContainerTest extends TestCase
9
{
10
    public function testContainer()
11
    {
12
        $container = new EmptyContainer();
13
        $this->assertFalse($container->has('foo'));
14
        $this->expectException(NotFoundExceptionInterface::class);
15
        $container->get('foo');
16
    }
17
}
18