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

@@ 294-307 (lines=14) @@
291
    /**
292
     * @test
293
     */
294
    public function shouldRejectControllerBeingCalledAgain()
295
    {
296
        $this->expectException(InvalidArgumentException::class);
297
298
        $controller = new GenericExceptionResponseController($this->controllerHelper, $this->argumentBuilder, [
299
            'inner-controller' => $this->innerController,
300
            'inner-controller-method' => "serialize",
301
        ]);
302
303
        $controller->__construct($this->controllerHelper, $this->argumentBuilder, [
304
            'inner-controller' => $this->innerController,
305
            'inner-controller-method' => "serialize",
306
        ]);
307
    }
308
309
    /**
310
     * @test