Skip to content

Commit

Permalink
Fix boolean value in assertSessionHasErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Apr 27, 2020
1 parent 7d86ff6 commit 80c3918
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Foundation/Testing/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,10 @@ public function assertSessionHasErrors($keys = [], $format = null, $errorBag = '
if (is_int($key)) {
PHPUnit::assertTrue($errors->has($value), "Session missing error: $value");
} else {
if (is_bool($value)) {
$value = (string) $value;
}

PHPUnit::assertContains($value, $errors->get($key, $format));
}
}
Expand Down

0 comments on commit 80c3918

Please # to comment.