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

testIsInstanceOfException()   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\ContainerException;
8
use PHPUnit\Framework\TestCase;
9
use Psr\Container\ContainerExceptionInterface;
10
11
/**
12
 * @author  Alex Patterson <[email protected]>
13
 * @package ArpTest\Container\Exception
14
 */
15
final class ContainerExceptionTest extends TestCase
16
{
17
    /**
18
     * Ensure that the exception is an instance of the default PHP exception instance.
19
     *
20
     * @covers \Arp\Container\Exception\ContainerException
21
     */
22
    public function testIsInstanceOfException(): void
23
    {
24
        $exception = new ContainerException();
25
26
        $this->assertInstanceOf(\Exception::class, $exception);
27
    }
28
29
    /**
30
     * Ensure that the exception implements ContainerExceptionInterface.
31
     *
32
     * @covers \Arp\Container\Exception\ContainerException
33
     */
34
    public function testImplementsContainerExceptionInterface(): void
35
    {
36
        $exception = new ContainerException();
37
38
        $this->assertInstanceOf(ContainerExceptionInterface::class, $exception);
39
    }
40
}
41