44
55namespace JsonSchema \Tests \Constraints ;
66
7+ use JsonSchema \UriRetrieverInterface ;
78use PHPUnit \Framework \TestCase ;
89use Prophecy \Argument ;
910use stdClass ;
10- use JsonSchema \UriRetrieverInterface ;
1111
1212abstract class VeryBaseTestCase extends TestCase
1313{
1414 private const DRAFT_SCHEMA_DIR = __DIR__ . '/../../dist/schema/ ' ;
1515 private const TEST_SUITE_REMOTES = __DIR__ . '/../../vendor/json-schema/json-schema-test-suite/remotes ' ;
1616
17- /** @var array<string, stdClass> */
17+ /** @var array<string, stdClass> */
1818 private $ draftSchemas = [];
1919
2020 protected function getUriRetrieverMock (?object $ schema ): object
@@ -26,7 +26,7 @@ protected function getUriRetrieverMock(?object $schema): object
2626
2727 $ that = $ this ;
2828 $ uriRetriever ->retrieve (Argument::any ())
29- ->will (function ($ args ) use ($ that ): stdClass {
29+ ->will (function ($ args ) use ($ that ): stdClass {
3030 if (strpos ($ args [0 ], 'http://json-schema.org/draft-03/schema ' ) === 0 ) {
3131 return $ that ->getDraftSchema ('json-schema-draft-03.json ' );
3232 }
@@ -68,6 +68,7 @@ private function readAndJsonDecodeFile(string $file): stdClass
6868 if (!file_exists ($ file )) {
6969 throw new \InvalidArgumentException (sprintf ('File "%s" does not exist ' , $ file ));
7070 }
71+
7172 return json_decode (file_get_contents ($ file ), false );
7273 }
7374}
0 commit comments