InvalidArgumentExceptionTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExceptionClass() 0 9 1
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