prevError() public method

Checks for the last error thrown during a database operation
Deprecation: Use MongoDB::prevError() instead.
public prevError ( ) : array
return array Returns the error and the number of operations ago it occurred.
    /**
     * @expectedException PHPUnit_Framework_Error
     */
    public function testPrevError() {
        $m = new Mongo();
        $m->resetError();
        $err = $m->prevError();
        $this->assertEquals($err['err'], null);
        $this->assertEquals($err['n'], 0);
        $this->assertEquals($err['nPrev'], -1);
        $this->assertEquals((bool)$err['ok'], true);

        $m->forceError();
        $err = $m->prevError();
        $this->assertNotNull($err['err']);
        $this->assertEquals($err['n'], 0);
        $this->assertEquals($err['nPrev'], 1);
        $this->assertEquals((bool)$err['ok'], true);
    }