FatalThrowableExceptionTest::testException()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace SfCod\QueueBundle\Tests\Exception;
4
5
use Exception;
6
use PHPUnit\Framework\TestCase;
7
use SfCod\QueueBundle\Exception\FatalThrowableException;
8
9
/**
10
 * Class FatalThrowableExceptionTest
11
 *
12
 * @author Virchenko Maksim <[email protected]>
13
 *
14
 * @package SfCod\QueueBundle\Tests\Exception
15
 */
16
class FatalThrowableExceptionTest extends TestCase
17
{
18
    /**
19
     * Test exception
20
     */
21
    public function testException()
22
    {
23
        $message = uniqid('message_');
24
25
        $line = __LINE__ + 1; // Exception line
26
        $exception = new FatalThrowableException(new Exception($message));
27
28
        self::assertEquals($message, $exception->getMessage());
29
        self::assertEquals(__FILE__, $exception->getFile());
30
        self::assertEquals($line, $exception->getLine());
31
    }
32
}
33