Code Duplication    Length = 14-16 lines in 3 locations

tests/unit/EventListener/Request/RequestProcessorTest.php 3 locations

@@ 99-114 (lines=16) @@
96
    /**
97
     * @test
98
     */
99
    public function willThrowExceptionWhenContentIsNotJson()
100
    {
101
        $processor = $this->createProcessor();
102
103
        $this->expectException(MalformedContentException::class);
104
105
        $processor->process(
106
            $this->createRequest(
107
                [
108
                    RequestMeta::ATTRIBUTE_URI  => '/uri',
109
                    RequestMeta::ATTRIBUTE_PATH => '/path',
110
                ],
111
                'not json'
112
            )
113
        );
114
    }
115
116
    /**
117
     * @test
@@ 119-132 (lines=14) @@
116
    /**
117
     * @test
118
     */
119
    public function willAssembleParameters()
120
    {
121
        $processor = $this->createProcessor();
122
        $this->parametersAssemblerMock->expects($this->once())->method('assemble');
123
124
        $processor->process(
125
            $this->createRequest(
126
                [
127
                    RequestMeta::ATTRIBUTE_URI  => '/uri',
128
                    RequestMeta::ATTRIBUTE_PATH => '/path',
129
                ]
130
            )
131
        );
132
    }
133
134
    /**
135
     * @test
@@ 280-294 (lines=15) @@
277
    /**
278
     * @test
279
     */
280
    public function willThrowExceptionIfRequestIsNotValid()
281
    {
282
        $processor = $this->createProcessor(false, false);
283
284
        $this->expectException(ValidationException::class);
285
286
        $processor->process(
287
            $this->createRequest(
288
                [
289
                    RequestMeta::ATTRIBUTE_URI  => '/uri',
290
                    RequestMeta::ATTRIBUTE_PATH => '/path',
291
                ]
292
            )
293
        );
294
    }
295
296
    /**
297
     * @test