@@ -12,9 +12,9 @@ public function test_validation_should_be_delegated_to_internal_validator()
1212 ->given (
1313 $ validator = $ this ->mockJsonSchemaValidator (),
1414 $ this ->calling ($ validator )->check = null ,
15- $ refResolver = $ this ->mockJsonSchemaRefResolver (),
16- $ this ->calling ($ refResolver )->resolveRef = 'resolvedJsonSchema ' ,
17- $ jsonSchemaTools = $ this ->mockJsonSchemaTools ($ validator , $ refResolver ),
15+ $ schemaStorage = $ this ->mockJsonSchemaStorage (),
16+ $ this ->calling ($ schemaStorage )->resolveRef = 'resolvedJsonSchema ' ,
17+ $ jsonSchemaTools = $ this ->mockJsonSchemaTools ($ validator , $ schemaStorage ),
1818 $ this ->newTestedInstance ($ jsonSchemaTools )
1919 )
2020 ->when (
@@ -50,9 +50,9 @@ public function test_invalid_internal_validation_lead_to_exception()
5050 $ this ->calling ($ validator )->check = null ,
5151 $ this ->calling ($ validator )->isValid = false ,
5252 $ this ->calling ($ validator )->getErrors = ['error1 ' , 'error2 ' ],
53- $ refResolver = $ this ->mockJsonSchemaRefResolver (),
54- $ this ->calling ($ refResolver )->resolve = 'resolvedJsonSchema ' ,
55- $ jsonSchemaTools = $ this ->mockJsonSchemaTools ($ validator , $ refResolver ),
53+ $ schemaStorage = $ this ->mockJsonSchemaStorage (),
54+ $ this ->calling ($ schemaStorage )->resolveRef = 'resolvedJsonSchema ' ,
55+ $ jsonSchemaTools = $ this ->mockJsonSchemaTools ($ validator , $ schemaStorage ),
5656 $ this ->newTestedInstance ($ jsonSchemaTools )
5757 )
5858 ->exception (function () {
@@ -71,19 +71,19 @@ private function mockJsonSchemaValidator()
7171 return new \mock \JsonSchema \Validator ;
7272 }
7373
74- private function mockJsonSchemaRefResolver ()
74+ private function mockJsonSchemaStorage ()
7575 {
7676 $ this ->mockGenerator ->orphanize ('__construct ' );
7777
78- return new \mock \JsonSchema \JsonStorage ();
78+ return new \mock \JsonSchema \SchemaStorage ();
7979 }
8080
81- private function mockJsonSchemaTools ($ validator = null , $ refResolver = null )
81+ private function mockJsonSchemaTools ($ validator = null , $ schemaStorage = null )
8282 {
8383 $ this ->mockGenerator ->orphanize ('__construct ' );
8484 $ mock = new \mock \Rezzza \SymfonyRestApiJson \JsonSchemaTools ;
8585 $ this ->calling ($ mock )->createValidator = $ validator ;
86- $ this ->calling ($ mock )->createSchemaStorage = $ refResolver ;
86+ $ this ->calling ($ mock )->createSchemaStorage = $ schemaStorage ;
8787
8888 return $ mock ;
8989 }
0 commit comments