Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
0496705c
Commit
0496705c
authored
7 years ago
by
Katherine Walker
Committed by
Katherine Walker
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add FCV to ChangeStream DocumentationExamplesTest
parent
9fbd982d
master
phplib-520
test-double-free
v1.3
v1.4
v1.5
v1.6
v1.7
1.7.0-beta1
1.6.0
1.5.2
1.5.1
1.5.0
1.4.3
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
DocumentationExamplesTest.php
tests/DocumentationExamplesTest.php
+5
-1
No files found.
tests/DocumentationExamplesTest.php
View file @
0496705c
...
@@ -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\ChangeStream
Command
::
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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment