@@ 313-330 (lines=18) @@ | ||
310 | /** |
|
311 | * @test |
|
312 | */ |
|
313 | public function shouldRejectCallWithoutRequest() |
|
314 | { |
|
315 | $this->expectException(InvalidArgumentException::class); |
|
316 | ||
317 | $controller = new GenericServiceInvokeController( |
|
318 | $this->controllerHelper, |
|
319 | $this->argumentCompiler, |
|
320 | $this->container, |
|
321 | [ |
|
322 | 'service' => 'some_service', |
|
323 | 'method' => 'doFoo', |
|
324 | ] |
|
325 | ); |
|
326 | ||
327 | $this->controllerHelper->method('getCurrentRequest')->willReturn(null); |
|
328 | ||
329 | $controller(); |
|
330 | } |
|
331 | ||
332 | } |
|
333 |
@@ 107-118 (lines=12) @@ | ||
104 | /** |
|
105 | * @test |
|
106 | */ |
|
107 | public function shouldRejectConstructorCalledAgain() |
|
108 | { |
|
109 | $this->expectException(InvalidArgumentException::class); |
|
110 | ||
111 | $controller = new GenericTemplateRenderController($this->controllerHelper, $this->argumentCompiler, [ |
|
112 | 'template' => "@foo/bar/baz.html", |
|
113 | ]); |
|
114 | ||
115 | $controller->__construct($this->controllerHelper, $this->argumentCompiler, [ |
|
116 | 'template' => "@foo/bar/baz.html", |
|
117 | ]); |
|
118 | } |
|
119 | ||
120 | /** |
|
121 | * @test |
|
@@ 171-183 (lines=13) @@ | ||
168 | /** |
|
169 | * @test |
|
170 | */ |
|
171 | public function shouldRejectCallWithoutRequest() |
|
172 | { |
|
173 | $this->expectException(InvalidArgumentException::class); |
|
174 | ||
175 | $controller = new GenericTemplateRenderController($this->controllerHelper, $this->argumentCompiler, [ |
|
176 | 'template' => "@foo/bar/baz.html", |
|
177 | 'arguments' => [] |
|
178 | ]); |
|
179 | ||
180 | $this->controllerHelper->method('getCurrentRequest')->willReturn(null); |
|
181 | ||
182 | $controller(); |
|
183 | } |
|
184 | ||
185 | } |
|
186 |