| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class JsonLoaderTest extends BaseTest |
||
| 17 | { |
||
| 18 | public function testGetConfig(): void |
||
| 19 | { |
||
| 20 | $cf = $this->getFactory(); |
||
| 21 | |||
| 22 | $this->assertEquals(['name' => 'value'], $cf->getConfig('json')); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function testEmpty(): void |
||
| 26 | { |
||
| 27 | $this->expectException(LoaderException::class); |
||
| 28 | |||
| 29 | $cf = $this->getFactory(); |
||
| 30 | $cf->getConfig('empty-json'); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testBroken(): void |
||
| 34 | { |
||
| 35 | $this->expectException(LoaderException::class); |
||
| 36 | |||
| 37 | $cf = $this->getFactory(); |
||
| 38 | $cf->getConfig('broken-json'); |
||
| 39 | } |
||
| 41 |