Passed
Push — master ( 960c23...81be97 )
by Carsten
01:48
created

ExceptionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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