Code Duplication    Length = 14-19 lines in 2 locations

tests/unit/Controllers/GenericExceptionResponseControllerTest.php 1 location

@@ 213-226 (lines=14) @@
210
    /**
211
     * @test
212
     */
213
    public function shouldThrowExceptionIfInnerControllerDidNotReturnAResponse()
214
    {
215
        $controller = new GenericExceptionResponseController($this->controllerHelper, $this->argumentBuilder, [
216
            'inner-controller' => $this->innerController,
217
            'inner-controller-method' => "serialize",
218
        ]);
219
220
        $this->expectException(InvalidArgumentException::class);
221
222
        /** @var Request $request */
223
        $request = $this->createMock(Request::class);
224
225
        $controller->executeInnerControllerSafely($request);
226
    }
227
228
    /**
229
     * @test

tests/unit/Controllers/GenericEntityCreateControllerTest.php 1 location

@@ 381-399 (lines=19) @@
378
    /**
379
     * @test
380
     */
381
    public function shouldRejectInvalidFactory()
382
    {
383
        $controller = new GenericEntityCreateController(
384
            $this->controllerHelper,
385
            $this->argumentBuilder,
386
            $this->container,
387
            [
388
                'entity-class' => SampleEntity::class,
389
                'factory' => '::serialize'
390
            ]
391
        );
392
393
        /** @var Request $request */
394
        $request = $this->createMock(Request::class);
395
396
        $this->expectException(InvalidArgumentException::class);
397
398
        $controller->createEntity($request);
399
    }
400
401
    /**
402
     * @test