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
ad506578
Commit
ad506578
authored
Feb 01, 2018
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip change stream tests if connected to a standalone
Change streams require a replica set.
parent
689d9437
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
DocumentationExamplesTest.php
tests/DocumentationExamplesTest.php
+5
-0
WatchFunctionalTest.php
tests/Operation/WatchFunctionalTest.php
+5
-0
No files found.
tests/DocumentationExamplesTest.php
View file @
ad506578
...
@@ -4,6 +4,7 @@ namespace MongoDB\Tests;
...
@@ -4,6 +4,7 @@ namespace MongoDB\Tests;
use
MongoDB\Database
;
use
MongoDB\Database
;
use
MongoDB\Driver\Cursor
;
use
MongoDB\Driver\Cursor
;
use
MongoDB\Driver\Server
;
use
MongoDB\Operation\DropCollection
;
use
MongoDB\Operation\DropCollection
;
use
MongoDB\Operation\DropDatabase
;
use
MongoDB\Operation\DropDatabase
;
...
@@ -923,6 +924,10 @@ class DocumentationExamplesTest extends FunctionalTestCase
...
@@ -923,6 +924,10 @@ class DocumentationExamplesTest extends FunctionalTestCase
public
function
testChangeStreamExample_1_4
()
public
function
testChangeStreamExample_1_4
()
{
{
if
(
$this
->
getPrimaryServer
()
->
getType
()
===
Server
::
TYPE_STANDALONE
)
{
$this
->
markTestSkipped
(
'$changeStream is not supported on standalone servers'
);
}
if
(
version_compare
(
$this
->
getFeatureCompatibilityVersion
(),
'3.6'
,
'<'
))
{
if
(
version_compare
(
$this
->
getFeatureCompatibilityVersion
(),
'3.6'
,
'<'
))
{
$this
->
markTestSkipped
(
'$changeStream is only supported on FCV 3.6 or higher'
);
$this
->
markTestSkipped
(
'$changeStream is only supported on FCV 3.6 or higher'
);
}
}
...
...
tests/Operation/WatchFunctionalTest.php
View file @
ad506578
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
MongoDB\Tests\Operation
;
namespace
MongoDB\Tests\Operation
;
use
MongoDB\Client
;
use
MongoDB\Client
;
use
MongoDB\Driver\Server
;
use
MongoDB\Operation\DatabaseCommand
;
use
MongoDB\Operation\DatabaseCommand
;
use
MongoDB\Operation\InsertOne
;
use
MongoDB\Operation\InsertOne
;
use
MongoDB\Operation\Watch
;
use
MongoDB\Operation\Watch
;
...
@@ -13,6 +14,10 @@ class WatchFunctionalTest extends FunctionalTestCase
...
@@ -13,6 +14,10 @@ class WatchFunctionalTest extends FunctionalTestCase
{
{
parent
::
setUp
();
parent
::
setUp
();
if
(
$this
->
getPrimaryServer
()
->
getType
()
===
Server
::
TYPE_STANDALONE
)
{
$this
->
markTestSkipped
(
'$changeStream is not supported on standalone servers'
);
}
if
(
version_compare
(
$this
->
getFeatureCompatibilityVersion
(),
'3.6'
,
'<'
))
{
if
(
version_compare
(
$this
->
getFeatureCompatibilityVersion
(),
'3.6'
,
'<'
))
{
$this
->
markTestSkipped
(
'$changeStream is only supported on FCV 3.6 or higher'
);
$this
->
markTestSkipped
(
'$changeStream is only supported on FCV 3.6 or higher'
);
}
}
...
...
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