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

testAggregateTimeoutException() public method

    public function testAggregateTimeoutException()
    {
        $collection = $this->getCollection();
        $this->failMaxTimeMS();
        $this->setExpectedException('MongoExecutionTimeoutException');
        $pipeline = [['$group' => ['_id' => '$foo', 'count' => ['$sum' => 1]]], ['$sort' => ['_id' => 1]]];
        $collection->aggregate($pipeline, ['maxTimeMS' => 1]);
    }
MongoCollectionTest