Passed
Pull Request — master (#3)
by Alex
06:48 queued 04:28
created

testImplementsNotFoundExceptionInterface()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
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