File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,37 @@ public function assertRedirectBack()
245245 return $ this ;
246246 }
247247
248+ /**
249+ * Assert whether the response is redirecting back to the previous location and the session has the given errors.
250+ *
251+ * @param string|array $keys
252+ * @param mixed $format
253+ * @param string $errorBag
254+ * @return $this
255+ */
256+ public function assertRedirectBackWithErrors ($ keys = [], $ format = null , $ errorBag = 'default ' )
257+ {
258+ $ this ->assertRedirectBack ();
259+
260+ $ this ->assertSessionHasErrors ($ keys , $ format , $ errorBag );
261+
262+ return $ this ;
263+ }
264+
265+ /**
266+ * Assert whether the response is redirecting back to the previous location with no errors in the session.
267+ *
268+ * @return $this
269+ */
270+ public function assertRedirectBackWithoutErrors ()
271+ {
272+ $ this ->assertRedirectBack ();
273+
274+ $ this ->assertSessionHasNoErrors ();
275+
276+ return $ this ;
277+ }
278+
248279 /**
249280 * Assert whether the response is redirecting to a given route.
250281 *
You can’t perform that action at this time.
0 commit comments