title: How to catch PHP Warning in PHPUnit
body: <p>I am writing test cases and here is a question I have.</p>
  <p>So say I am testing a simple function <code>someClass::loadValue($value)</code></p>
  <p>The normal test case is easy, but assume when passing in null or -1 the function call generates a PHP Warning, which is considered a bug.</p>
  <p>The question is, how do I write my PHPUnit test case so that it succeeds when the functions handles null/-1 gracefully, and fail when there is a PHP Warning thrown?</p>