Skip to content

Commit

Permalink
Merge pull request #32555 from laravel/fix-boolean-value-assert-errors
Browse files Browse the repository at this point in the history
[6.x] Fix boolean value in assertSessionHasErrors
  • Loading branch information
taylorotwell authored Apr 27, 2020
2 parents 7d86ff6 + 209f6e2 commit 01be623
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 @@ -1029,7 +1029,7 @@ public function assertSessionHasErrors($keys = [], $format = null, $errorBag = '
if (is_int($key)) {
PHPUnit::assertTrue($errors->has($value), "Session missing error: $value");
} else {
PHPUnit::assertContains($value, $errors->get($key, $format));
PHPUnit::assertContains(is_bool($value) ? (string) $value : $value, $errors->get($key, $format));
}
}

Expand Down

0 comments on commit 01be623

Please sign in to comment.