diff --git a/src/test/AbstractResourceCest.php b/src/test/AbstractResourceCest.php index 1693718..d15116b 100644 --- a/src/test/AbstractResourceCest.php +++ b/src/test/AbstractResourceCest.php @@ -305,12 +305,15 @@ protected function checkValidationResponse(Tester $I, Example $example) if (empty($example['validationErrors'])) { return; } + $expected = []; foreach ($example['validationErrors'] as $field => $message) { - $I->seeResponseContainsJson([ + $expected[] = [ 'field' => $field, 'message' => $message, - ]); + ]; } + $I->seeResponseContainsJson($expected); + } /**