From 45b687f23a3e38081c6d0bc2fe53761ab5c85e23 Mon Sep 17 00:00:00 2001 From: Angel Guevara Date: Fri, 29 Dec 2017 14:58:54 -0600 Subject: [PATCH] fix json validated in sequence. --- src/test/AbstractResourceCest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); + } /**