Code Duplication    Length = 14-19 lines in 2 locations

tests/unit/Controllers/GenericEntityCreateControllerTest.php 1 location

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

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