@@ -171,7 +171,7 @@ public function testApplyWithDefaultSerializerContextExclusionPolicy()
171171
172172 public function testApplyWithSerializerContextOptionsForSymfonySerializer ()
173173 {
174- $ this ->serializer = $ this ->getMock ('Symfony\Component\Serializer\SerializerInterface ' );
174+ $ this ->serializer = $ this ->getMock ('\ Symfony\Component\Serializer\Serializer ' , array ( ' deserialize ' ) );
175175 $ this ->converter = new RequestBodyParamConverter ($ this ->serializer );
176176 $ requestBody = '{"name": "Post 1", "body": "This is a blog post"} ' ;
177177
@@ -193,7 +193,9 @@ public function testApplyWithSerializerContextOptionsForSymfonySerializer()
193193
194194 public function testApplyWithValidationErrors ()
195195 {
196- $ validator = $ this ->getMock ('Symfony\Component\Validator\ValidatorInterface ' );
196+ $ validator = $ this ->getMockBuilder ('Symfony\Component\Validator\Validator ' )
197+ ->disableOriginalConstructor ()
198+ ->getMock ();
197199 $ validationErrors = $ this ->getMock ('Symfony\Component\Validator\ConstraintViolationList ' );
198200
199201 $ this ->converter = new RequestBodyParamConverter ($ this ->serializer , null , null , $ validator , 'validationErrors ' );
@@ -290,8 +292,10 @@ public function testValidatorOptionsStructureAfterMergeWithUserOptions()
290292 );
291293 $ config = $ this ->createConfiguration (null , null , $ userOptions );
292294
293- $ validatorMock = $ this ->getMock ('Symfony\Component\Validator\ValidatorInterface ' );
294- $ this ->converter = new RequestBodyParamConverter ($ this ->serializer , null , null , $ validatorMock , 'validationErrors ' );
295+ $ validator = $ this ->getMockBuilder ('Symfony\Component\Validator\Validator ' )
296+ ->disableOriginalConstructor ()
297+ ->getMock ();
298+ $ this ->converter = new RequestBodyParamConverter ($ this ->serializer , null , null , $ validator , 'validationErrors ' );
295299 $ request = $ this ->createRequest ();
296300
297301 $ this ->converter ->apply ($ request , $ config );
0 commit comments