| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class WrongIpExceptionTest extends TestCase |
||
| 11 | { |
||
| 12 | /** @test */ |
||
| 13 | public function fromIpAddressProperlyCreatesExceptionWithoutPrev(): void |
||
| 14 | { |
||
| 15 | $e = WrongIpException::fromIpAddress('1.2.3.4'); |
||
| 16 | |||
| 17 | $this->assertEquals('Provided IP "1.2.3.4" is invalid', $e->getMessage()); |
||
| 18 | $this->assertEquals(0, $e->getCode()); |
||
| 19 | $this->assertNull($e->getPrevious()); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** @test */ |
||
| 23 | public function fromIpAddressProperlyCreatesExceptionWithPrev(): void |
||
| 31 | } |
||
| 32 | } |
||
| 33 |