Code Duplication    Length = 9-10 lines in 2 locations

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

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

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

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