Skip to content

Commit 05e715d

Browse files
committed
Flip test names
1 parent 97351ed commit 05e715d

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

tests/query/bug2457-001.phpt

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,47 @@
11
--TEST--
2-
PHPC-2457: Query modifiers can be passed reference
2+
PHPC-2457: Query options can be passed reference
33
--FILE--
44
<?php
55

6-
$modifiers = ['$orderby' => ['x' => 1]];
6+
$collation = ['locale' => 'fr_FR', 'strength' => 2];
7+
$let = ['x' => 1];
8+
$sort = ['_id' => 1];
79

810
$query = new MongoDB\Driver\Query([], [
9-
'modifiers' => &$modifiers,
11+
'collation' => &$collation,
12+
'let' => &$let,
13+
'sort' => &$sort,
1014
]);
1115

1216
var_dump($query);
1317

1418
?>
1519
===DONE===
1620
<?php exit(0); ?>
17-
--EXPECTF--
18-
Deprecated: MongoDB\Driver\Query::__construct(): The "modifiers" option is deprecated and will be removed in a future release in %s
21+
--EXPECT--
1922
object(MongoDB\Driver\Query)#1 (3) {
2023
["filter"]=>
2124
object(stdClass)#2 (0) {
2225
}
2326
["options"]=>
24-
object(stdClass)#4 (1) {
25-
["sort"]=>
26-
object(stdClass)#3 (1) {
27+
object(stdClass)#6 (3) {
28+
["collation"]=>
29+
object(stdClass)#3 (2) {
30+
["locale"]=>
31+
string(5) "fr_FR"
32+
["strength"]=>
33+
int(2)
34+
}
35+
["let"]=>
36+
object(stdClass)#4 (1) {
2737
["x"]=>
2838
int(1)
2939
}
40+
["sort"]=>
41+
object(stdClass)#5 (1) {
42+
["_id"]=>
43+
int(1)
44+
}
3045
}
3146
["readConcern"]=>
3247
NULL

tests/query/bug2457-002.phpt

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,30 @@
11
--TEST--
2-
PHPC-2457: Query options can be passed reference
2+
PHPC-2457: Query modifiers can be passed reference
33
--FILE--
44
<?php
55

6-
$collation = ['locale' => 'fr_FR', 'strength' => 2];
7-
$let = ['x' => 1];
8-
$sort = ['_id' => 1];
6+
$modifiers = ['$orderby' => ['x' => 1]];
97

108
$query = new MongoDB\Driver\Query([], [
11-
'collation' => &$collation,
12-
'let' => &$let,
13-
'sort' => &$sort,
9+
'modifiers' => &$modifiers,
1410
]);
1511

1612
var_dump($query);
1713

1814
?>
1915
===DONE===
2016
<?php exit(0); ?>
21-
--EXPECT--
17+
--EXPECTF--
18+
Deprecated: MongoDB\Driver\Query::__construct(): The "modifiers" option is deprecated and will be removed in a future release in %s
2219
object(MongoDB\Driver\Query)#1 (3) {
2320
["filter"]=>
2421
object(stdClass)#2 (0) {
2522
}
2623
["options"]=>
27-
object(stdClass)#6 (3) {
28-
["collation"]=>
29-
object(stdClass)#3 (2) {
30-
["locale"]=>
31-
string(5) "fr_FR"
32-
["strength"]=>
33-
int(2)
34-
}
35-
["let"]=>
36-
object(stdClass)#4 (1) {
37-
["x"]=>
38-
int(1)
39-
}
24+
object(stdClass)#4 (1) {
4025
["sort"]=>
41-
object(stdClass)#5 (1) {
42-
["_id"]=>
26+
object(stdClass)#3 (1) {
27+
["x"]=>
4328
int(1)
4429
}
4530
}

0 commit comments

Comments
 (0)