title: SimpleTest: How to assert that a PHP error is thrown?
body: <p>If I am correct, SimpleTest will allow you to assert a PHP error is thrown. However, I can't figure out how to use it, based on the documentation. I want to assert that the object I pass into my constructor is an instance of <code>MyOtherObject</code></p>
  
  <pre><code>class Object {
      public function __construct(MyOtherObject $object) {
          //do something with $object
      }
  }
  
  //...and in my test I have...
  public function testConstruct_ExpectsAnInstanceOfMyOtherObject() {
      $notAnObject = 'foobar';
      $object = new Object($notAnObject);
      $this-&gt;expectError($object);
  }
  </code></pre>
  
  <p>Where am I going wrong?</p>