Why does phpunit not show any errors in the console

前端 未结 3 1084
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-29 01:44

I\'m using phpunit with Laravel 4 framework. Why is it that when there\'s a PHP error during the tests, no error messages are shown (eg: missing method)?

How can we

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-29 02:28

    You can use something like below to exclusively print errors to console.

    $response = $this->get('https://stackoverflow.com/questions/18047844-NotFound/');
    $response->dumpSession($keys = ['error']);
    

提交回复
热议问题