title: PHPUnit test code inside catch block
body: <p>I have a Symfony controller using try...catch.
  I use phpunit to test my application. I have searched but havent found a way how to test the code inside a catch exception. How can I force php unit to pretend that something went wrong and enters the catch block and test this as well?</p>
  
  <p>ie:</p>
  
  <pre><code> try {
        $foo = 1;
       } catch (\Exception $ex) {
          $mail = new Mail();
          $mail-&gt;sendMail();
          return new Response();
      }
  </code></pre>
  
  <p>How can I tell phpunit to throw an \Exception so it will test code inside catch block of above?</p>