Commit 2ec8ccfd authored by Derick Rethans's avatar Derick Rethans

Skip bypassDocumentValidation tests for MongoDB versions prior to 3.2

parent 554e73f7
...@@ -195,6 +195,10 @@ class AggregateFunctionalTest extends FunctionalTestCase ...@@ -195,6 +195,10 @@ class AggregateFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationSetWhenTrue() public function testBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new Aggregate( $operation = new Aggregate(
...@@ -215,6 +219,10 @@ class AggregateFunctionalTest extends FunctionalTestCase ...@@ -215,6 +219,10 @@ class AggregateFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationUnsetWhenFalse() public function testBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new Aggregate( $operation = new Aggregate(
......
...@@ -307,6 +307,10 @@ class BulkWriteFunctionalTest extends FunctionalTestCase ...@@ -307,6 +307,10 @@ class BulkWriteFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationSetWhenTrue() public function testBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new BulkWrite( $operation = new BulkWrite(
...@@ -327,6 +331,10 @@ class BulkWriteFunctionalTest extends FunctionalTestCase ...@@ -327,6 +331,10 @@ class BulkWriteFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationUnsetWhenFalse() public function testBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new BulkWrite( $operation = new BulkWrite(
......
...@@ -294,6 +294,10 @@ class ExplainFunctionalTest extends FunctionalTestCase ...@@ -294,6 +294,10 @@ class ExplainFunctionalTest extends FunctionalTestCase
public function testUpdateBypassDocumentValidationSetWhenTrue() public function testUpdateBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
$this->createFixtures(3); $this->createFixtures(3);
(new CommandObserver)->observe( (new CommandObserver)->observe(
...@@ -321,6 +325,10 @@ class ExplainFunctionalTest extends FunctionalTestCase ...@@ -321,6 +325,10 @@ class ExplainFunctionalTest extends FunctionalTestCase
public function testUpdateBypassDocumentValidationUnsetWhenFalse() public function testUpdateBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
$this->createFixtures(3); $this->createFixtures(3);
(new CommandObserver)->observe( (new CommandObserver)->observe(
......
...@@ -78,6 +78,10 @@ class FindAndModifyFunctionalTest extends FunctionalTestCase ...@@ -78,6 +78,10 @@ class FindAndModifyFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationSetWhenTrue() public function testBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new FindAndModify( $operation = new FindAndModify(
...@@ -97,6 +101,10 @@ class FindAndModifyFunctionalTest extends FunctionalTestCase ...@@ -97,6 +101,10 @@ class FindAndModifyFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationUnsetWhenFalse() public function testBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new FindAndModify( $operation = new FindAndModify(
......
...@@ -78,6 +78,10 @@ class InsertManyFunctionalTest extends FunctionalTestCase ...@@ -78,6 +78,10 @@ class InsertManyFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationSetWhenTrue() public function testBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new InsertMany( $operation = new InsertMany(
...@@ -98,6 +102,10 @@ class InsertManyFunctionalTest extends FunctionalTestCase ...@@ -98,6 +102,10 @@ class InsertManyFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationUnsetWhenFalse() public function testBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new InsertMany( $operation = new InsertMany(
......
...@@ -93,6 +93,10 @@ class InsertOneFunctionalTest extends FunctionalTestCase ...@@ -93,6 +93,10 @@ class InsertOneFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationSetWhenTrue() public function testBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new InsertOne( $operation = new InsertOne(
...@@ -113,6 +117,10 @@ class InsertOneFunctionalTest extends FunctionalTestCase ...@@ -113,6 +117,10 @@ class InsertOneFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationUnsetWhenFalse() public function testBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new InsertOne( $operation = new InsertOne(
......
...@@ -158,6 +158,10 @@ class MapReduceFunctionalTest extends FunctionalTestCase ...@@ -158,6 +158,10 @@ class MapReduceFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationSetWhenTrue() public function testBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
$this->createFixtures(1); $this->createFixtures(1);
(new CommandObserver)->observe( (new CommandObserver)->observe(
...@@ -182,6 +186,10 @@ class MapReduceFunctionalTest extends FunctionalTestCase ...@@ -182,6 +186,10 @@ class MapReduceFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationUnsetWhenFalse() public function testBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
$this->createFixtures(1); $this->createFixtures(1);
(new CommandObserver)->observe( (new CommandObserver)->observe(
......
...@@ -48,6 +48,10 @@ class UpdateFunctionalTest extends FunctionalTestCase ...@@ -48,6 +48,10 @@ class UpdateFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationSetWhenTrue() public function testBypassDocumentValidationSetWhenTrue()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new Update( $operation = new Update(
...@@ -69,6 +73,10 @@ class UpdateFunctionalTest extends FunctionalTestCase ...@@ -69,6 +73,10 @@ class UpdateFunctionalTest extends FunctionalTestCase
public function testBypassDocumentValidationUnsetWhenFalse() public function testBypassDocumentValidationUnsetWhenFalse()
{ {
if (version_compare($this->getServerVersion(), '3.2.0', '<')) {
$this->markTestSkipped('bypassDocumentValidation is not supported');
}
(new CommandObserver)->observe( (new CommandObserver)->observe(
function() { function() {
$operation = new Update( $operation = new Update(
......
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