From 5a603458698281d060ca3c148c7591819c293b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Nabia=C5=82ek?= Date: Thu, 24 May 2018 21:12:16 +0200 Subject: [PATCH] Add assertion to verify there are no errors --- src/Illuminate/Foundation/Testing/TestResponse.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Illuminate/Foundation/Testing/TestResponse.php b/src/Illuminate/Foundation/Testing/TestResponse.php index 849671cbb9a3..633c9b45b414 100644 --- a/src/Illuminate/Foundation/Testing/TestResponse.php +++ b/src/Illuminate/Foundation/Testing/TestResponse.php @@ -799,6 +799,18 @@ public function assertSessionHasErrors($keys = [], $format = null, $errorBag = ' return $this; } + /** + * Assert that the session has no errors. + * + * @return $this + */ + public function assertSessionHasNoErrors() + { + $this->assertSessionMissing('errors'); + + return $this; + } + /** * Assert that the session has the given errors. *