/** * @expectedException PHPUnit_Framework_Error */ public function testResetError() { $m = new Mongo(); $m->resetError(); $err = $m->lastError(); $this->assertEquals($err['err'], null); $this->assertEquals($err['n'], 0); $this->assertEquals((bool)$err['ok'], true); }