public function testAggregateQuery() { /** @var AggregateQuery $qB */ $qB = $this->aq->getCollection('Document:Dummy')->createAggregateQuery(); $result = $qB->match(['testProperty' => 1])->getQuery()->aggregate(); $this->assertInstanceOf('\\Doctrine\\MongoDB\\ArrayIterator', $result); }
/** * @param string|null $stage * * @return Stage */ protected function createAggregationQuery($stage = null) { return $this->aggregationQueryBuilder->getCollection($this->getClassName())->createAggregateQuery($stage); }