|
16 | 16 | use App\Tests\Utils\PhpUnitUtil; |
17 | 17 | use App\Utils\JSON; |
18 | 18 | use BadMethodCallException; |
19 | | -use Doctrine\DBAL\Exception as DBALException; |
20 | | -use Doctrine\ORM\Exception\ORMException; |
| 19 | +use Doctrine\DBAL\Exception\InvalidArgumentException; |
21 | 20 | use Exception; |
22 | 21 | use Generator; |
23 | 22 | use JsonException; |
@@ -334,14 +333,14 @@ public static function dataProviderTestResponseHasExpectedStatusCode(): Generato |
334 | 333 |
|
335 | 334 | yield [ |
336 | 335 | Response::HTTP_INTERNAL_SERVER_ERROR, |
337 | | - new DBALException('Error message', Response::HTTP_INTERNAL_SERVER_ERROR), |
| 336 | + new InvalidArgumentException('Error message', Response::HTTP_INTERNAL_SERVER_ERROR), |
338 | 337 | 'dev', |
339 | 338 | 'Error message', |
340 | 339 | ]; |
341 | 340 |
|
342 | 341 | yield [ |
343 | 342 | Response::HTTP_INTERNAL_SERVER_ERROR, |
344 | | - new DBALException('Error message', Response::HTTP_INTERNAL_SERVER_ERROR), |
| 343 | + new InvalidArgumentException('Error message', Response::HTTP_INTERNAL_SERVER_ERROR), |
345 | 344 | 'prod', |
346 | 345 | 'Database error.', |
347 | 346 | ]; |
@@ -521,25 +520,25 @@ public static function dataProviderTestThatGetExceptionMessageReturnsExpected(): |
521 | 520 |
|
522 | 521 | yield [ |
523 | 522 | 'Database error.', |
524 | | - new DBALException('some message'), |
| 523 | + new InvalidArgumentException('some message'), |
525 | 524 | 'prod', |
526 | 525 | ]; |
527 | 526 |
|
528 | 527 | yield [ |
529 | 528 | 'some message', |
530 | | - new DBALException('some message'), |
| 529 | + new InvalidArgumentException('some message'), |
531 | 530 | 'dev', |
532 | 531 | ]; |
533 | 532 |
|
534 | 533 | yield [ |
535 | 534 | 'Database error.', |
536 | | - new ORMException('some message'), |
| 535 | + new InvalidArgumentException('some message'), |
537 | 536 | 'prod', |
538 | 537 | ]; |
539 | 538 |
|
540 | 539 | yield [ |
541 | 540 | 'some message', |
542 | | - new ORMException('some message'), |
| 541 | + new InvalidArgumentException('some message'), |
543 | 542 | 'dev', |
544 | 543 | ]; |
545 | 544 |
|
|
0 commit comments