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
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());
// Start Changestream Example 1
......@@ -938,7 +942,7 @@ class DocumentationExamplesTest extends FunctionalTestCase
$this->assertNull($current);
// 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();
$current = $cursor->current();
// 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