| @@ 241-256 (lines=16) @@ | ||
| 238 | /** |
|
| 239 | * @test |
|
| 240 | */ |
|
| 241 | public function shouldRejectCallWithNonArrayParameters() |
|
| 242 | { |
|
| 243 | $this->expectException(InvalidArgumentException::class); |
|
| 244 | ||
| 245 | $controller = new GenericEntityCreateController( |
|
| 246 | $this->controllerHelper, |
|
| 247 | $this->argumentBuilder, |
|
| 248 | $this->container, |
|
| 249 | [ |
|
| 250 | 'entity-class' => SampleEntity::class, |
|
| 251 | 'calls' => [ |
|
| 252 | 'doFoo' => "notAnArray" |
|
| 253 | ] |
|
| 254 | ] |
|
| 255 | ); |
|
| 256 | } |
|
| 257 | ||
| 258 | /** |
|
| 259 | * @test |
|
| @@ 281-289 (lines=9) @@ | ||
| 278 | /** |
|
| 279 | * @test |
|
| 280 | */ |
|
| 281 | public function shouldRejectNonObjectInnerController() |
|
| 282 | { |
|
| 283 | $this->expectException(InvalidArgumentException::class); |
|
| 284 | ||
| 285 | $controller = new GenericExceptionResponseController($this->controllerHelper, $this->argumentBuilder, [ |
|
| 286 | 'inner-controller' => false, |
|
| 287 | 'inner-controller-method' => "serialize", |
|
| 288 | ]); |
|
| 289 | } |
|
| 290 | ||
| 291 | /** |
|
| 292 | * @test |
|
| @@ 312-321 (lines=10) @@ | ||
| 309 | /** |
|
| 310 | * @test |
|
| 311 | */ |
|
| 312 | public function shouldRejectNonArrayGivenAsInnerControllerArguments() |
|
| 313 | { |
|
| 314 | $this->expectException(InvalidArgumentException::class); |
|
| 315 | ||
| 316 | $controller = new GenericExceptionResponseController($this->controllerHelper, $this->argumentBuilder, [ |
|
| 317 | 'inner-controller' => $this->innerController, |
|
| 318 | 'inner-controller-method' => "serialize", |
|
| 319 | 'arguments' => "Lorem ipsum", |
|
| 320 | ]); |
|
| 321 | } |
|
| 322 | ||
| 323 | /** |
|
| 324 | * @test |
|