Adapt aggregate explain checks to new response format

parent c8365aed
...@@ -217,7 +217,17 @@ class AggregateFunctionalTest extends FunctionalTestCase ...@@ -217,7 +217,17 @@ class AggregateFunctionalTest extends FunctionalTestCase
$results = iterator_to_array($operation->execute($this->getPrimaryServer())); $results = iterator_to_array($operation->execute($this->getPrimaryServer()));
$this->assertCount(1, $results); $this->assertCount(1, $results);
$this->assertObjectHasAttribute('stages', current($results)); $result = current($results);
if ($this->isShardedCluster()) {
$this->assertObjectHasAttribute('shards', $result);
foreach ($result->shards as $shard) {
$this->assertObjectHasAttribute('stages', $shard);
}
} else {
$this->assertObjectHasAttribute('stages', $result);
}
}, },
function(array $event) { function(array $event) {
$this->assertObjectNotHasAttribute('writeConcern', $event['started']->getCommand()); $this->assertObjectNotHasAttribute('writeConcern', $event['started']->getCommand());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment