Code Duplication    Length = 9-10 lines in 2 locations

src/Tests/Request/ContentDecoder/ContentDecoderTest.php 1 location

@@ 62-71 (lines=10) @@
59
     *
60
     * @expectedException \KleijnWeb\SwaggerBundle\Exception\MalformedContentException
61
     */
62
    public function willThrowMalformedContentExceptionWhenDecodingFails()
63
    {
64
        $content = 'NOT VALID JSON';
65
        $request = new Request([], [], [], [], [], [], $content);
66
        $request->headers->set('Content-Type', 'application/json');
67
68
        $operationObject = OperationObject::createFromOperationDefinition((object)[]);
69
70
        $this->contentDecoder->decodeContent($request, $operationObject);
71
    }
72
}
73

src/Tests/Request/ContentDecoder/ContentDecoderJmsSerializerCompatibilityTest.php 1 location

@@ 85-93 (lines=9) @@
82
     *
83
     * @expectedException \KleijnWeb\SwaggerBundle\Exception\MalformedContentException
84
     */
85
    public function willThrowMalformedContentExceptionWhenDecodingFails()
86
    {
87
        $content = 'lkjhlkj';
88
        $request = new Request([], [], [], [], [], [], $content);
89
        $request->headers->set('Content-Type', 'application/json');
90
91
        $operationObject = OperationObject::createFromOperationDefinition((object)[]);
92
        $this->contentDecoder->decodeContent($request, $operationObject);
93
    }
94
95
    /**
96
     * @test