InvalidArgumentExceptionTest::testExceptionClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Artack\Dsn\Exception;
6
7
use PHPUnit\Framework\TestCase;
8
9
class InvalidArgumentExceptionTest extends TestCase
10
{
11
    public function testExceptionClass(): void
12
    {
13
        $previousException = new \RuntimeException();
14
        $exception = new InvalidArgumentException('message', 1, $previousException);
15
16
        $this->assertSame('message', $exception->getMessage());
17
        $this->assertSame(1, $exception->getCode());
18
        $this->assertSame($previousException, $exception->getPrevious());
19
        $this->assertInstanceOf(DsnException::class, $exception);
20
    }
21
}
22