title: Mocking methods to throw Error phpunit
body: <p>PHPUnit let me make a method stub to throw an Exception, using either of:</p>
  
  <ul>
  <li><code>[-&gt;will($this-&gt;throwException(..)][1]</code></li>
  <li><code>-&gt;willThrowException(..</code></li>
  </ul>
  
  <p>I need to test some cases where the method stub throws PHP Errors. </p>
  
  <p>Does PHPUnit support anything like this? Any workarounds here?</p>