public function testForceError() { $this->object->forceError(); $err = $this->object->lastError(); $this->assertNotNull($err['err']); $this->assertEquals($err['n'], 0); $this->assertEquals((bool)$err['ok'], true); }
/** * Wrapper method for MongoDB::lastError(). * * @see http://php.net/manual/en/mongodb.lasterror.php * @return array */ public function lastError() { return $this->mongoDB->lastError(); }
public function lastError() { return $this->_connected ? $this->_db->lastError() : NULL; }