Commit 0496705c authored by Katherine Walker's avatar Katherine Walker Committed by Katherine Walker

Add FCV to ChangeStream DocumentationExamplesTest

parent 9fbd982d
...@@ -927,6 +927,10 @@ class DocumentationExamplesTest extends FunctionalTestCase ...@@ -927,6 +927,10 @@ class DocumentationExamplesTest extends FunctionalTestCase
public function testChangeStreamExample_1_3() public function testChangeStreamExample_1_3()
{ {
if (version_compare($this->getFeatureCompatibilityVersion(), '3.6', '<')) {
$this->markTestSkipped('$changeStream is only supported on FCV 3.6 or higher');
}
$db = new Database($this->manager, $this->getDatabaseName()); $db = new Database($this->manager, $this->getDatabaseName());
// Start Changestream Example 1 // Start Changestream Example 1
...@@ -938,7 +942,7 @@ class DocumentationExamplesTest extends FunctionalTestCase ...@@ -938,7 +942,7 @@ class DocumentationExamplesTest extends FunctionalTestCase
$this->assertNull($current); $this->assertNull($current);
// Start Changestream Example 2 // Start Changestream Example 2
$cursor = $db->inventory->watch([], ['fullDocument' => \MongoDB\Operation\ChangeStreamCommand::FULL_DOCUMENT_UPDATE_LOOKUP]); $cursor = $db->inventory->watch([], ['fullDocument' => \MongoDB\Operation\ChangeStream::FULL_DOCUMENT_UPDATE_LOOKUP]);
$cursor->next(); $cursor->next();
$current = $cursor->current(); $current = $cursor->current();
// End Changestream Example 2 // End Changestream Example 2
......
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