Skip to content

Commit 4e22eb2

Browse files
committed
Skip $out aggregation test for MongoDB 2.4
1 parent 0241eda commit 4e22eb2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/Collection/CrudSpec/AggregateFunctionalTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace MongoDB\Tests\Collection\CrudSpec;
44

55
use MongoDB\Collection;
6+
use MongoDB\FeatureDetection;
7+
use MongoDB\Driver\ReadPreference;
68

79
/**
810
* CRUD spec functional tests for aggregate().
@@ -39,6 +41,12 @@ public function testAggregateWithMultipleStages()
3941

4042
public function testAggregateWithOut()
4143
{
44+
$server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
45+
46+
if ( ! FeatureDetection::isSupported($server, FeatureDetection::API_AGGREGATE_CURSOR)) {
47+
$this->markTestSkipped('$out aggregation pipeline operator is not supported');
48+
}
49+
4250
$outputCollection = new Collection($this->manager, $this->getNamespace() . '_output');
4351
$this->dropCollectionIfItExists($outputCollection);
4452

0 commit comments

Comments
 (0)