| 1 | <?php declare(strict_types=1); |
||
| 23 | class OverflowExceptionTest extends TestCase |
||
| 24 | { |
||
| 25 | public function testCatchExceptionByInterface() |
||
| 26 | { |
||
| 27 | try { |
||
| 28 | throw new OverflowException('test'); |
||
| 29 | } catch (ObjectMapExceptionInterface $e) { |
||
| 30 | $this->assertSame('test', $e->getMessage()); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | public function testCatchExceptionByCoreException() |
||
| 35 | { |
||
| 36 | try { |
||
| 37 | throw new OverflowException('test'); |
||
| 38 | } catch (\OverflowException $e) { |
||
| 39 | $this->assertSame('test', $e->getMessage()); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 |