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