PHPLIB-450: Update change stream docs example for resume token access

parent a6ac94d6
...@@ -981,7 +981,7 @@ class DocumentationExamplesTest extends FunctionalTestCase ...@@ -981,7 +981,7 @@ class DocumentationExamplesTest extends FunctionalTestCase
$this->assertMatchesDocument($expectedChange, $lastChange); $this->assertMatchesDocument($expectedChange, $lastChange);
// Start Changestream Example 3 // Start Changestream Example 3
$resumeToken = ($lastChange !== null) ? $lastChange->_id : null; $resumeToken = $changeStream->getResumeToken();
if ($resumeToken === null) { if ($resumeToken === null) {
throw new \Exception('Resume token was not found'); throw new \Exception('Resume token was not found');
......
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