@@ 260-273 (lines=14) @@ | ||
257 | /** |
|
258 | * @test |
|
259 | */ |
|
260 | public function shouldRejectNonEntityClass() |
|
261 | { |
|
262 | $this->expectException(InvalidArgumentException::class); |
|
263 | $this->expectExceptionMessage('Expected an existing class name. Got: "NonExistingClass"'); |
|
264 | ||
265 | new GenericEntityInvokeController( |
|
266 | $this->controllerHelper, |
|
267 | $this->argumentCompiler, |
|
268 | [ |
|
269 | 'entity-class' => "NonExistingClass", |
|
270 | 'method' => 'buildArguments', |
|
271 | ] |
|
272 | ); |
|
273 | } |
|
274 | ||
275 | /** |
|
276 | * @test |
|
@@ 278-290 (lines=13) @@ | ||
275 | /** |
|
276 | * @test |
|
277 | */ |
|
278 | public function shouldRejectNonExistingMethod() |
|
279 | { |
|
280 | $this->expectException(InvalidArgumentException::class); |
|
281 | ||
282 | new GenericEntityInvokeController( |
|
283 | $this->controllerHelper, |
|
284 | $this->argumentCompiler, |
|
285 | [ |
|
286 | 'entity-class' => get_class($this->argumentCompiler), |
|
287 | 'method' => 'nonExistingMethod', |
|
288 | ] |
|
289 | ); |
|
290 | } |
|
291 | ||
292 | /** |
|
293 | * @test |
|
@@ 295-308 (lines=14) @@ | ||
292 | /** |
|
293 | * @test |
|
294 | */ |
|
295 | public function shouldRejectNonArrayArguments() |
|
296 | { |
|
297 | $this->expectException(InvalidArgumentException::class); |
|
298 | ||
299 | new GenericEntityInvokeController( |
|
300 | $this->controllerHelper, |
|
301 | $this->argumentCompiler, |
|
302 | [ |
|
303 | 'entity-class' => get_class($this->argumentCompiler), |
|
304 | 'method' => 'buildArguments', |
|
305 | 'arguments' => "12345", |
|
306 | ] |
|
307 | ); |
|
308 | } |
|
309 | ||
310 | /** |
|
311 | * @test |