Code Duplication    Length = 14-24 lines in 2 locations

tests/unit/Controllers/API/GenericServiceInvokeControllerTest.php 1 location

@@ 54-77 (lines=24) @@
51
    /**
52
     * @test
53
     */
54
    public function shouldPreventConstructorCalledAgain()
55
    {
56
        $this->expectException(InvalidArgumentException::class);
57
58
        $controller = new GenericServiceInvokeController(
59
            $this->controllerHelper,
60
            $this->argumentCompiler,
61
            $this->container,
62
            [
63
                'service' => 'some_service',
64
                'method' => 'doFoo'
65
            ]
66
        );
67
68
        $controller->__construct(
69
            $this->controllerHelper,
70
            $this->argumentCompiler,
71
            $this->container,
72
            [
73
                'service' => 'some_service',
74
                'method' => 'doFoo'
75
            ]
76
        );
77
    }
78
79
    /**
80
     * @test

tests/unit/Controllers/GenericExceptionResponseControllerTest.php 1 location

@@ 351-364 (lines=14) @@
348
    /**
349
     * @test
350
     */
351
    public function shouldRejectControllerBeingCalledAgain()
352
    {
353
        $this->expectException(InvalidArgumentException::class);
354
355
        $controller = new GenericExceptionResponseController($this->controllerHelper, $this->argumentBuilder, [
356
            'inner-controller' => $this->innerController,
357
            'inner-controller-method' => "serialize",
358
        ]);
359
360
        $controller->__construct($this->controllerHelper, $this->argumentBuilder, [
361
            'inner-controller' => $this->innerController,
362
            'inner-controller-method' => "serialize",
363
        ]);
364
    }
365
366
    /**
367
     * @test