title: phpunit testing expectedException not working
body: <p>I am trying to test my class for InvalidArgumentException but I get </p>
  
  <blockquote>
    <p>Tests\BarTest::should_receive_parameter Missing argument 1 for
    Itdc\Foo\Bar::__construct(), called in
    /mypath/foo/tests/BarTest.php on line 10 and
    defined</p>
  </blockquote>
  
  <p>This is the test (BarTest.php) file I use:</p>
  
  <pre><code>&lt;?php namespace Tests;
  use Itdc\Foo\Bar;
  class BarTest extends \PHPUnit_Framework_TestCase {
      /** @test */
      public function should_receive_parameter() {
          $this-&gt;setExpectedException('Exception');
          $id = new Bar;
      }
  }
  </code></pre>
  
  <p>This is Bar class:</p>
  
  <pre><code>&lt;?php namespace Itdc\Foo;
  class Bar {
      public function __construct($a) {
          // do something
      }
  }
  </code></pre>
  
  <p>I have tried to puth setExpectedException in comment section, also tried to use InvalidArgumentException, but no luck.</p>
  
  <p>Any suggetions what I am doing wrong would be appreciated.</p>