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

ExceptionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testThrownExceptionValues() 0 9 2
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