@@ -138,10 +138,6 @@ public function testDefaultReplacement()
138138 public function testReturnBeforeGettingConstraints ()
139139 {
140140 $ param = $ this ->getMockBuilder (\FOS \RestBundle \Controller \Annotations \ParamInterface::class)->getMock ();
141- $ param
142- ->expects ($ this ->once ())
143- ->method ('getDefault ' )
144- ->willReturn ('default ' );
145141 $ param
146142 ->expects ($ this ->never ())
147143 ->method ('getConstraints ' );
@@ -150,7 +146,7 @@ public function testReturnBeforeGettingConstraints()
150146
151147 $ this ->assertEquals (
152148 'default ' ,
153- $ method ->invokeArgs ($ fetcher , array ($ param , 'default ' , null ))
149+ $ method ->invokeArgs ($ fetcher , array ($ param , 'default ' , null , ' default ' ))
154150 );
155151 }
156152
@@ -161,7 +157,7 @@ public function testReturnWhenEmptyConstraints()
161157
162158 $ this ->assertEquals (
163159 'value ' ,
164- $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , null ))
160+ $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , null , null ))
165161 );
166162 }
167163
@@ -198,7 +194,7 @@ public function testNoValidationErrors()
198194 ->with ('value ' , array ('constraint ' ))
199195 ->willReturn (array ());
200196
201- $ this ->assertEquals ('value ' , $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , null )));
197+ $ this ->assertEquals ('value ' , $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , null , null )));
202198 }
203199
204200 public function testValidationErrors ()
@@ -218,7 +214,7 @@ public function testValidationErrors()
218214 ->with ('value ' , ['constraint ' ])
219215 ->willReturn ($ errors );
220216
221- $ this ->assertEquals ('default ' , $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , false )));
217+ $ this ->assertEquals ('default ' , $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , false , ' default ' )));
222218 }
223219
224220 public function testValidationException ()
@@ -238,7 +234,7 @@ public function testValidationException()
238234 ->willReturn ($ errors );
239235
240236 try {
241- $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , true ));
237+ $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , true , ' default ' ));
242238 $ this ->fail (sprintf ('An exception must be thrown in %s ' , __METHOD__ ));
243239 } catch (InvalidParameterException $ exception ) {
244240 $ this ->assertSame ($ param , $ exception ->getParameter ());
@@ -272,7 +268,7 @@ public function testValidationErrorsInStrictMode()
272268 ->with ('value ' , array ('constraint ' ))
273269 ->willReturn ($ errors );
274270
275- $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , true ));
271+ $ method ->invokeArgs ($ fetcher , array ($ param , 'value ' , true , null ));
276272 }
277273
278274 protected function getFetcherToCheckValidation ($ param , array $ constructionArguments = null )
0 commit comments