Completed
Push — master ( 008bc0...0640ce )
by
unknown
46:22 queued 05:29
created

FatalThrowableExceptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testException() 0 11 1
1
<?php
2
3
namespace SfCod\QueueBundle\Tests\Exception;
4
5
use PHPUnit\Framework\TestCase;
6
use SfCod\QueueBundle\Exception\FatalThrowableException;
7
use Exception;
8
9
/**
10
 * Class FatalThrowableExceptionTest
11
 * @author Virchenko Maksim <[email protected]>
12
 * @package SfCod\QueueBundle\Tests\Exception
13
 */
14
class FatalThrowableExceptionTest extends TestCase
15
{
16
    /**
17
     * Test exception
18
     */
19
    public function testException()
20
    {
21
        $message = uniqid('message_');
22
23
        $line = __LINE__ + 1; // Exception line
24
        $exception = new FatalThrowableException(new Exception($message));
25
26
        $this->assertEquals($message, $exception->getMessage());
27
        $this->assertEquals(__FILE__, $exception->getFile());
28
        $this->assertEquals($line, $exception->getLine());
29
    }
30
}