Creates a database error
public forceError ( ) : boolean | ||
Результат | boolean | Returns the database response. |
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::forceError(). * * @deprecated 1.1 Deprecated in driver; will be removed for 1.2 * @see http://php.net/manual/en/mongodb.forceerror.php * @return array */ public function forceError() { return $this->mongoDB->forceError(); }