title: How to make symfony display exceptions in functional testing with phpunit
body: <p>When I run unit tests with PhpUnit in console all exceptions are display immediately there. However when I moved to functional testing I cannot see exceptions which occur.</p>
  
  <p>First I tried symfony <code>WebTestCase</code> as it was said <a href="https://symfony.com/doc/3.2/testing.html" rel="nofollow noreferrer">here</a>. So I called <code>$client</code> with needed parameters and I have a response. But it took time to me to understand that this behaviour is just like I manually open a page I want to test. And a response from <code>$client-&gt;request</code> contains text (html). Yes errors are show there but there are pretty much html and it is really hard to find the exception. Yes, I can use <code>$crawler-&gt;filter('.text-exception')-&gt;first()-&gt;text()</code> but I want so that exception was visible like in unit test. When I tested commands exceptions are shown by PhpUnit as well as normal.</p>
  
  <p>I tried to copy code from <code>web/app_dev.php</code> to test case. But it is the same. I have only html response.</p>
  
  <p>So how can I make it so that PhpUnit display exceptions in functional testing like in unit testing?</p>