diff --git a/src/Illuminate/Foundation/Testing/TestResponse.php b/src/Illuminate/Foundation/Testing/TestResponse.php index 954b4d63e5c3..4eb82d8b9d70 100644 --- a/src/Illuminate/Foundation/Testing/TestResponse.php +++ b/src/Illuminate/Foundation/Testing/TestResponse.php @@ -1168,6 +1168,23 @@ public function dumpHeaders() return $this; } + /** + * Dump the session from the response. + * + * @param array $keys + * @return $this + */ + public function dumpSession($keys = null) + { + if (is_array($keys)) { + dump($this->session()->only($keys)); + } else { + dump($this->session()->all()); + } + + return $this; + } + /** * Get the streamed content from the response. *