Alcaeus\MongoDbAdapter\Tests\Mongo\MongoCollectionTest::testFindAndModifyExceptionTimeout PHP Method

testFindAndModifyExceptionTimeout() public method

    public function testFindAndModifyExceptionTimeout()
    {
        $this->failMaxTimeMS();
        $id = '54203e08d51d4a1f868b456e';
        $collection = $this->getCollection();
        $this->setExpectedException('MongoExecutionTimeoutException');
        $document = $collection->findAndModify(['_id' => new \MongoId($id)], null, null, ['maxTimeMS' => 1, 'remove' => true]);
    }
MongoCollectionTest