diff --git a/Tests/Request/RequestBodyParamConverterTest.php b/Tests/Request/RequestBodyParamConverterTest.php index 85e198f77..b797350c3 100644 --- a/Tests/Request/RequestBodyParamConverterTest.php +++ b/Tests/Request/RequestBodyParamConverterTest.php @@ -138,7 +138,7 @@ public function testRequestAttribute() ->expects($this->once()) ->method('deserialize') ->willReturn('Object'); - $request = $this->createRequest(); + $request = $this->createRequest(null, 'application/json'); $this->launchExecution($converter, $request); $this->assertEquals('Object', $request->attributes->get('foo')); } @@ -159,7 +159,7 @@ public function testValidatorParameters() $converter = new RequestBodyParamConverter($this->serializer, null, null, $validator, 'errors'); - $request = $this->createRequest(); + $request = $this->createRequest(null, 'application/json'); $configuration = $this->createConfiguration(null, null, ['validator' => ['groups' => ['foo']]]); $this->launchExecution($converter, $request, $configuration); $this->assertEquals('fooError', $request->attributes->get('errors')); @@ -179,7 +179,7 @@ public function testValidatorSkipping() $converter = new RequestBodyParamConverter($this->serializer, null, null, $validator, 'errors'); - $request = $this->createRequest(); + $request = $this->createRequest(null, 'application/json'); $configuration = $this->createConfiguration(null, null, ['validate' => false]); $this->launchExecution($converter, $request, $configuration); $this->assertNull($request->attributes->get('errors')); @@ -277,7 +277,6 @@ public function testNoContentTypeCausesUnsupportedMediaTypeException() { $converter = new RequestBodyParamConverter($this->serializer); $request = $this->createRequest(); - $request->headers->remove('CONTENT_TYPE'); $this->expectException(UnsupportedMediaTypeHttpException::class); $this->launchExecution($converter, $request); }