Skip to content

Commit 8731030

Browse files
authored
Adds TestResponse::dd (#39359)
1 parent b53152b commit 8731030

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/Illuminate/Testing/TestResponse.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,43 @@ protected function session()
13581358
return app('session.store');
13591359
}
13601360

1361+
/**
1362+
* Dump the content from the response and end the script.
1363+
*
1364+
* @return never
1365+
*/
1366+
public function dd()
1367+
{
1368+
$this->dump();
1369+
1370+
exit(1);
1371+
}
1372+
1373+
/**
1374+
* Dump the headers from the response and end the script.
1375+
*
1376+
* @return never
1377+
*/
1378+
public function ddHeaders()
1379+
{
1380+
$this->dumpHeaders();
1381+
1382+
exit(1);
1383+
}
1384+
1385+
/**
1386+
* Dump the session from the response and end the script.
1387+
*
1388+
* @param string|array $keys
1389+
* @return never
1390+
*/
1391+
public function ddSession($keys = [])
1392+
{
1393+
$this->dumpSession($keys);
1394+
1395+
exit(1);
1396+
}
1397+
13611398
/**
13621399
* Dump the content from the response.
13631400
*

0 commit comments

Comments
 (0)