/** * @expectedException \BadMethodCallException */ public function testTimeoutShouldThrowExceptionForOldDrivers() { if (method_exists('MongoCommandCursor', 'timeout')) { $this->markTestSkipped('This test is not applicable to drivers with MongoCommandCursor::timeout()'); } $commandCursor = new CommandCursor($this->getMockMongoCommandCursor()); $commandCursor->timeout(1000); }
/** * Wrapper method for MongoCommandCursor::valid(). * * @see http://php.net/manual/en/iterator.valid.php * @see http://php.net/manual/en/mongocommandcursor.valid.php * @return boolean */ public function valid() { return $this->commandCursor->valid(); }