Skip to content

Commit

Permalink
Fix assertSessionHasErrors (#23093)
Browse files Browse the repository at this point in the history
  • Loading branch information
sileence authored and taylorotwell committed Feb 9, 2018
1 parent ca97eea commit 15ffac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Testing/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ public function assertSessionHasErrors($keys = [], $format = null, $errorBag = '
$errors = app('session.store')->get('errors')->getBag($errorBag);

foreach ($keys as $key => $value) {
if (is_int($value)) {
if (is_int($key)) {
PHPUnit::assertTrue($errors->has($value), "Session missing error: $value");
} else {
PHPUnit::assertContains($value, $errors->get($key, $format));
Expand Down

0 comments on commit 15ffac3

Please sign in to comment.