Skip to content

Commit bf5cf8b

Browse files
committed
PHPC-1179: arrayFilters tests don't need to start servers
These tests were only using Mongo Orchestration to ensure a 3.6 server. skip_if_server_version() can be used instead.
1 parent e398717 commit bf5cf8b

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

tests/bulk/bulkwrite-update-arrayFilters-001.phpt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
--TEST--
22
MongoDB\Driver\BulkWrite::update with arrayFilters
3-
--XFAIL--
4-
START() tests must be reimplemented (PHPC-1179)
53
--SKIPIF--
64
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
7-
<?php START('THROWAWAY', ["version" => "36-release"]); CLEANUP(THROWAWAY); ?>
5+
<?php skip_if_not_live(); ?>
6+
<?php skip_if_server_version('<', '3.6'); ?>
7+
<?php skip_if_not_clean(); ?>
88
--FILE--
99
<?php
1010
require_once __DIR__ . "/../utils/basic.inc";
1111

12-
$manager = new MongoDB\Driver\Manager(THROWAWAY);
12+
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
$bulk = new MongoDB\Driver\BulkWrite();
1515

@@ -35,11 +35,7 @@ $cursor = $manager->executeQuery( DATABASE_NAME . '.' . COLLECTION_NAME, new \Mo
3535
var_dump($cursor->toArray());
3636
?>
3737
===DONE===
38-
<?php DELETE("THROWAWAY"); ?>
3938
<?php exit(0); ?>
40-
--CLEAN--
41-
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
42-
<?php DELETE("THROWAWAY"); ?>
4339
--EXPECTF--
4440
array(%d) {
4541
[0]=>

tests/command/findAndModify-001.phpt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
--TEST--
22
MongoDB\Driver\Command with findAndModify and arrayFilters
3-
--XFAIL--
4-
START() tests must be reimplemented (PHPC-1179)
53
--SKIPIF--
64
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
7-
<?php START('THROWAWAY', ["version" => "36-release"]); CLEANUP(THROWAWAY); ?>
5+
<?php skip_if_not_live(); ?>
6+
<?php skip_if_server_version('<', '3.6'); ?>
7+
<?php skip_if_not_clean(); ?>
88
--FILE--
99
<?php
1010
require_once __DIR__ . "/../utils/basic.inc";
1111

12-
$manager = new MongoDB\Driver\Manager(THROWAWAY);
12+
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
$bulk = new MongoDB\Driver\BulkWrite();
1515

@@ -35,11 +35,7 @@ $cursor = $manager->executeQuery( DATABASE_NAME . '.' . COLLECTION_NAME, new \Mo
3535
var_dump($cursor->toArray());
3636
?>
3737
===DONE===
38-
<?php DELETE("THROWAWAY"); ?>
3938
<?php exit(0); ?>
40-
--CLEAN--
41-
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
42-
<?php DELETE("THROWAWAY"); ?>
4339
--EXPECTF--
4440
array(%d) {
4541
[0]=>

tests/command/update-001.phpt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
--TEST--
22
MongoDB\Driver\Command with update and arrayFilters
3-
--XFAIL--
4-
START() tests must be reimplemented (PHPC-1179)
53
--SKIPIF--
64
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
7-
<?php START('THROWAWAY', ["version" => "36-release"]); CLEANUP(THROWAWAY); ?>
5+
<?php skip_if_not_live(); ?>
6+
<?php skip_if_server_version('<', '3.6'); ?>
7+
<?php skip_if_not_clean(); ?>
88
--FILE--
99
<?php
1010
require_once __DIR__ . "/../utils/basic.inc";
1111

12-
$manager = new MongoDB\Driver\Manager(THROWAWAY);
12+
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
$bulk = new MongoDB\Driver\BulkWrite();
1515

@@ -35,11 +35,7 @@ $cursor = $manager->executeQuery( DATABASE_NAME . '.' . COLLECTION_NAME, new \Mo
3535
var_dump($cursor->toArray());
3636
?>
3737
===DONE===
38-
<?php DELETE("THROWAWAY"); ?>
3938
<?php exit(0); ?>
40-
--CLEAN--
41-
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
42-
<?php DELETE("THROWAWAY"); ?>
4339
--EXPECTF--
4440
array(%d) {
4541
[0]=>

0 commit comments

Comments
 (0)