'bar'], iterator_to_array($source)); } public function test_invalid_json_throws_exception(): void { $this->expectException(InvalidJson::class); $this->expectExceptionCode(1566307185); $this->expectExceptionMessage('The given value is not a valid JSON entry.'); new JsonSource('@'); } public function test_invalid_json_type_throws_exception(): void { $this->expectException(SourceNotIterable::class); $this->expectExceptionCode(1566307291); $this->expectExceptionMessage('The configuration is not an iterable but of type `bool`.'); new JsonSource('true'); } }