Completed
Branch release/v1.0.0 (b932d7)
by Edward
03:07 queued 40s
created

ImmutableExceptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstruct() 0 8 1
1
<?php
2
/**
3
 * File ImmutableExceptionTest.php
4
 *
5
 * @author Edward Pfremmer <[email protected]>
6
 */
7
namespace Epfremme\Tests\Exception;
8
9
use Epfremme\Exception\ImmutableException;
10
11
/**
12
 * Class ImmutableExceptionTest
13
 *
14
 * @package Epfremme\Tests\Exception
15
 */
16
class ImmutableExceptionTest extends \PHPUnit_Framework_TestCase
17
{
18
    /**
19
     * Test immutable exception
20
     *
21
     * @return void
22
     */
23
    public function testConstruct()
24
    {
25
        $exception = new ImmutableException();
26
27
        $this->assertInstanceOf(\Exception::class, $exception);
28
        $this->assertEquals(ImmutableException::MESSAGE, $exception->getMessage());
29
        $this->assertEquals(500, $exception->getCode());
30
    }
31
}
32