Passed
Pull Request — master (#3353)
by Sean
14:43
created

AbstractDriverExceptionTest.php$0 ➔ __construct()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
1
<?php
2
3
namespace Doctrine\Tests\DBAL\Driver;
4
5
use Doctrine\DBAL\Driver\AbstractDriverException;
6
use Exception;
7
use PHPUnit\Framework\TestCase;
8
use Throwable;
9
10
class AbstractDriverExceptionTest extends TestCase
11
{
12
    public function testCanSetPreviousException()
13
    {
14
        $previous = new Exception();
15
16
        $abstractDriverException = new class($previous) extends AbstractDriverException {
17
            public function __construct(Throwable $previous)
18
            {
19
                parent::__construct('', null, null, $previous);
20
            }
21
        };
22
23
        $this->assertSame($previous, $abstractDriverException->getPrevious());
24
    }
25
}
26