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