assertInstanceOf('PEAR_Error', $error); $this->assertEquals($message, $error->getMessage()); $this->assertEquals($code, $error->getCode()); } }