Skip to content

Commit

Permalink
fix json validated in sequence.
Browse files Browse the repository at this point in the history
  • Loading branch information
Faryshta authored Dec 29, 2017
1 parent 5e44319 commit 45b687f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/test/AbstractResourceCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

/**
Expand Down

0 comments on commit 45b687f

Please sign in to comment.