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