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

ImmutableExceptionTest::testConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4286
cc 1
eloc 5
nc 1
nop 0
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