Code Duplication    Length = 9-12 lines in 3 locations

tests/unit/Controllers/GenericEntityFetchControllerTest.php 3 locations

@@ 221-229 (lines=9) @@
218
    /**
219
     * @test
220
     */
221
    public function shouldThrowExceptionOnInvalidNormalizer()
222
    {
223
        $this->expectException(InvalidArgumentException::class);
224
225
        $controller = new GenericEntityFetchController($this->controllerHelper, [
226
            'entity-class' => SampleEntity::class,
227
            'normalizer' => false
228
        ]);
229
    }
230
231
    /**
232
     * @test
@@ 234-242 (lines=9) @@
231
    /**
232
     * @test
233
     */
234
    public function shouldThrowExceptionOnInvalidEncoder()
235
    {
236
        $this->expectException(InvalidArgumentException::class);
237
238
        $controller = new GenericEntityFetchController($this->controllerHelper, [
239
            'entity-class' => SampleEntity::class,
240
            'encoder' => false
241
        ]);
242
    }
243
244
    /**
245
     * @test
@@ 247-258 (lines=12) @@
244
    /**
245
     * @test
246
     */
247
    public function shouldThrowExceptionWhenCallingConstructorAgain()
248
    {
249
        $this->expectException(InvalidArgumentException::class);
250
251
        $controller = new GenericEntityFetchController($this->controllerHelper, [
252
            'entity-class' => SampleEntity::class,
253
        ]);
254
255
        $controller->__construct($this->controllerHelper, [
256
            'entity-class' => SampleEntity::class,
257
        ]);
258
    }
259
260
261
}