| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 13 | final class JsonLoaderTest extends TestCase |
||
| 14 | { |
||
| 15 | public function testHasErrorWithWrongPath(): void |
||
| 16 | { |
||
| 17 | $path = __DIR__ . '/wrong/path/non-existing-file.json'; |
||
| 18 | $this->expectException(NotReadableException::class); |
||
| 19 | new JsonLoader($path); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function testHasErrorWithInvalidFile(): void |
||
| 27 | } |
||
| 28 | |||
| 29 | public function testHasDataWithValidFileButNoArrayContent(): void |
||
| 30 | { |
||
| 31 | $path = __DIR__ . '/../fixtures/validJsonNotAnArray.json'; |
||
| 32 | $this->expectException(InvalidJsonException::class); |
||
| 33 | new JsonLoader($path); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function testHasDataWithValidFile(): void |
||
| 41 | } |
||
| 42 | } |
||
| 43 |