| 1 | <?php |
||
| 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 |