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