Completed
Push — master ( fd82b5...6d00ae )
by Carsten
02:20
created

ExceptionTest::testThrownExceptionValues()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 2
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Economic\Tests;
4
5
use Economic\API\Exception;
6
7
class ExceptionTest extends \PHPUnit_Framework_TestCase
8
{
9
    private $testMessage = 'Economic Message';
10
    private $testCode = 100;
11
12
    public function testThrownExceptionValues()
13
    {
14
        try {
15
            throw new Exception($this->testMessage, $this->testCode);
16
        } catch (Exception $e) {
17
            $this->assertEquals($e->getMessage(), $this->testMessage);
18
            $this->assertEquals($e->getCode(), $this->testCode);
19
        }
20
    }
21
}
22