Passed
Pull Request — master (#3)
by Alex
02:09
created

NotFoundExceptionTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
c 0
b 0
f 0
dl 0
loc 36
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testImplementsContainerExceptionInterface() 0 5 1
A testIsInstanceOfException() 0 5 1
A testImplementsNotFoundExceptionInterface() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ArpTest\Container\Exception;
6
7
use Arp\Container\Exception\NotFoundException;
8
use PHPUnit\Framework\TestCase;
9
use Psr\Container\ContainerExceptionInterface;
10
use Psr\Container\NotFoundExceptionInterface;
11
12
/**
13
 * @author  Alex Patterson <[email protected]>
14
 * @package ArpTest\Container\Exception
15
 */
16
final class NotFoundExceptionTest extends TestCase
17
{
18
    /**
19
     * Ensure that the exception is an instance of the default PHP exception instance.
20
     *
21
     * @covers \Arp\Container\Exception\NotFoundException
22
     */
23
    public function testIsInstanceOfException(): void
24
    {
25
        $exception = new NotFoundException();
26
27
        $this->assertInstanceOf(\Exception::class, $exception);
28
    }
29
30
    /**
31
     * Ensure that the exception implements ContainerExceptionInterface.
32
     *
33
     * @covers \Arp\Container\Exception\NotFoundException
34
     */
35
    public function testImplementsContainerExceptionInterface(): void
36
    {
37
        $exception = new NotFoundException();
38
39
        $this->assertInstanceOf(ContainerExceptionInterface::class, $exception);
40
    }
41
42
    /**
43
     * Ensure that the exception implements NotFoundExceptionInterface.
44
     *
45
     * @covers \Arp\Container\Exception\NotFoundException
46
     */
47
    public function testImplementsNotFoundExceptionInterface(): void
48
    {
49
        $exception = new NotFoundException();
50
51
        $this->assertInstanceOf(NotFoundExceptionInterface::class, $exception);
52
    }
53
}
54