Skip to content

Commit 2c5a02f

Browse files
committed
Fix tests failing due to different __set_state output
1 parent 2a46ed2 commit 2c5a02f

24 files changed

+106
-106
lines changed

tests/bson/bson-binary-set_state-001.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@ foreach ($tests as $test) {
2525
===DONE===
2626
<?php exit(0); ?>
2727
--EXPECTF--
28-
MongoDB\BSON\Binary::__set_state(array(
28+
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
2929
%w'data' => 'foobar',
3030
%w'type' => 0,
3131
))
3232

33-
MongoDB\BSON\Binary::__set_state(array(
33+
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
3434
%w'data' => '',
3535
%w'type' => 0,
3636
))
3737

38-
MongoDB\BSON\Binary::__set_state(array(
38+
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
3939
%w'data' => '' . "\0" . 'foo',
4040
%w'type' => 0,
4141
))
4242

43-
MongoDB\BSON\Binary::__set_state(array(
43+
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
4444
%w'data' => '>Egè›Ó¤VBfUD' . "\0" . '' . "\0" . '',
4545
%w'type' => 4,
4646
))
4747

48-
MongoDB\BSON\Binary::__set_state(array(
48+
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
4949
%w'data' => '8Xö"0¬<‘_0 fCÆ?',
5050
%w'type' => 5,
5151
))

tests/bson/bson-decimal128-set_state-001.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@ foreach ($tests as $value) {
2525
===DONE===
2626
<?php exit(0); ?>
2727
--EXPECTF--
28-
MongoDB\BSON\Decimal128::__set_state(array(
28+
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
2929
%w'dec' => '1234.5678',
3030
))
3131

32-
MongoDB\BSON\Decimal128::__set_state(array(
32+
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
3333
%w'dec' => '-1234.5678',
3434
))
3535

36-
MongoDB\BSON\Decimal128::__set_state(array(
36+
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
3737
%w'dec' => 'Infinity',
3838
))
3939

40-
MongoDB\BSON\Decimal128::__set_state(array(
40+
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
4141
%w'dec' => 'Infinity',
4242
))
4343

44-
MongoDB\BSON\Decimal128::__set_state(array(
44+
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
4545
%w'dec' => 'NaN',
4646
))
4747

48-
MongoDB\BSON\Decimal128::__set_state(array(
48+
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
4949
%w'dec' => 'NaN',
5050
))
5151

tests/bson/bson-javascript-set_state-001.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,38 +30,38 @@ echo "\n\n";
3030
===DONE===
3131
<?php exit(0); ?>
3232
--EXPECTF--
33-
MongoDB\BSON\Javascript::__set_state(array(
33+
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
3434
%w'code' => 'function foo(bar) { return bar; }',
3535
%w'scope' => NULL,
3636
))
3737

38-
MongoDB\BSON\Javascript::__set_state(array(
38+
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
3939
%w'code' => 'function foo(bar) { return bar; }',
4040
%w'scope' =>
4141
%Sarray(
4242
%S),
4343
))
4444

45-
MongoDB\BSON\Javascript::__set_state(array(
45+
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
4646
%w'code' => 'function foo() { return foo; }',
4747
%w'scope' =>
4848
%Sarray(
4949
%w'foo' => 42,
5050
%S),
5151
))
5252

53-
MongoDB\BSON\Javascript::__set_state(array(
53+
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
5454
%w'code' => 'function foo() { return id; }',
5555
%w'scope' =>
5656
%Sarray(
5757
%w'id' =>
58-
MongoDB\BSON\ObjectId::__set_state(array(
58+
%r\\?%rMongoDB\BSON\ObjectId::__set_state(array(
5959
%w'oid' => '53e2a1c40640fd72175d4603',
6060
)),
6161
%S),
6262
))
6363

64-
MongoDB\BSON\Javascript::__set_state(array(
64+
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
6565
%w'code' => 'function foo(bar) { return bar; }',
6666
%w'scope' => NULL,
6767
))

tests/bson/bson-maxkey-set_state-001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo "\n";
99
?>
1010
===DONE===
1111
<?php exit(0); ?>
12-
--EXPECT--
13-
MongoDB\BSON\MaxKey::__set_state(array(
12+
--EXPECTF--
13+
%r\\?%rMongoDB\BSON\MaxKey::__set_state(array(
1414
))
1515
===DONE===

tests/bson/bson-minkey-set_state-001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo "\n";
99
?>
1010
===DONE===
1111
<?php exit(0); ?>
12-
--EXPECT--
13-
MongoDB\BSON\MinKey::__set_state(array(
12+
--EXPECTF--
13+
%r\\?%rMongoDB\BSON\MinKey::__set_state(array(
1414
))
1515
===DONE===

tests/bson/bson-objectid-set_state-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "\n";
1212
===DONE===
1313
<?php exit(0); ?>
1414
--EXPECTF--
15-
MongoDB\BSON\ObjectId::__set_state(array(
15+
%r\\?%rMongoDB\BSON\ObjectId::__set_state(array(
1616
%w'oid' => '576c25db6118fd406e6e6471',
1717
))
1818
===DONE===

tests/bson/bson-regex-set_state-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo "\n";
1313
===DONE===
1414
<?php exit(0); ?>
1515
--EXPECTF--
16-
MongoDB\BSON\Regex::__set_state(array(
16+
%r\\?%rMongoDB\BSON\Regex::__set_state(array(
1717
%w'pattern' => 'regexp',
1818
%w'flags' => 'i',
1919
))

tests/bson/bson-regex-set_state-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo "\n";
1313
===DONE===
1414
<?php exit(0); ?>
1515
--EXPECTF--
16-
MongoDB\BSON\Regex::__set_state(array(
16+
%r\\?%rMongoDB\BSON\Regex::__set_state(array(
1717
%w'pattern' => 'regexp',
1818
%w'flags' => 'ilmsux',
1919
))

tests/bson/bson-timestamp-set_state-001.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ foreach ($tests as $test) {
2323
===DONE===
2424
<?php exit(0); ?>
2525
--EXPECTF--
26-
MongoDB\BSON\Timestamp::__set_state(array(
26+
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
2727
%w'increment' => '1234',
2828
%w'timestamp' => '5678',
2929
))
3030

31-
MongoDB\BSON\Timestamp::__set_state(array(
31+
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
3232
%w'increment' => '2147483647',
3333
%w'timestamp' => '0',
3434
))
3535

36-
MongoDB\BSON\Timestamp::__set_state(array(
36+
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
3737
%w'increment' => '0',
3838
%w'timestamp' => '2147483647',
3939
))

tests/bson/bson-timestamp-set_state-002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ foreach ($tests as $test) {
2424
===DONE===
2525
<?php exit(0); ?>
2626
--EXPECTF--
27-
MongoDB\BSON\Timestamp::__set_state(array(
27+
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
2828
%w'increment' => '4294967295',
2929
%w'timestamp' => '0',
3030
))
3131

32-
MongoDB\BSON\Timestamp::__set_state(array(
32+
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
3333
%w'increment' => '0',
3434
%w'timestamp' => '4294967295',
3535
))

tests/bson/bson-utcdatetime-set_state-001.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ foreach ($tests as $milliseconds) {
2020
===DONE===
2121
<?php exit(0); ?>
2222
--EXPECTF--
23-
MongoDB\BSON\UTCDateTime::__set_state(array(
23+
%r\\?%rMongoDB\BSON\UTCDateTime::__set_state(array(
2424
%w'milliseconds' => '0',
2525
))
2626

27-
MongoDB\BSON\UTCDateTime::__set_state(array(
27+
%r\\?%rMongoDB\BSON\UTCDateTime::__set_state(array(
2828
%w'milliseconds' => '-1416445411987',
2929
))
3030

31-
MongoDB\BSON\UTCDateTime::__set_state(array(
31+
%r\\?%rMongoDB\BSON\UTCDateTime::__set_state(array(
3232
%w'milliseconds' => '1416445411987',
3333
))
3434

tests/bson/bson-utcdatetime-set_state-002.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ foreach ($tests as $milliseconds) {
2222
===DONE===
2323
<?php exit(0); ?>
2424
--EXPECTF--
25-
MongoDB\BSON\UTCDateTime::__set_state(array(
25+
%r\\?%rMongoDB\BSON\UTCDateTime::__set_state(array(
2626
%w'milliseconds' => '0',
2727
))
2828

29-
MongoDB\BSON\UTCDateTime::__set_state(array(
29+
%r\\?%rMongoDB\BSON\UTCDateTime::__set_state(array(
3030
%w'milliseconds' => '-1416445411987',
3131
))
3232

33-
MongoDB\BSON\UTCDateTime::__set_state(array(
33+
%r\\?%rMongoDB\BSON\UTCDateTime::__set_state(array(
3434
%w'milliseconds' => '1416445411987',
3535
))
3636

tests/cursorid/cursorid-set_state-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "\n";
1212
===DONE===
1313
<?php exit(0); ?>
1414
--EXPECTF--
15-
MongoDB\Driver\CursorId::__set_state(array(
15+
%r\\?%rMongoDB\Driver\CursorId::__set_state(array(
1616
'id' => %r(7250031947823432848|'7250031947823432848')%r,
1717
))
1818
===DONE===

tests/cursorid/cursorid-var_export-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo var_export($cursorId, true), "\n";
1313
===DONE===
1414
<?php exit(0); ?>
1515
--EXPECTF--
16-
MongoDB\Driver\CursorId::__set_state(array(
16+
%r\\?%rMongoDB\Driver\CursorId::__set_state(array(
1717
'id' => %r(7250031947823432848|'7250031947823432848')%r,
1818
))
1919
===DONE===

tests/readConcern/readconcern-set_state-001.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ echo "\n\n";
2727
===DONE===
2828
<?php exit(0); ?>
2929
--EXPECTF--
30-
MongoDB\Driver\ReadConcern::__set_state(array(
30+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
3131
%w'level' => 'available',
3232
))
3333

34-
MongoDB\Driver\ReadConcern::__set_state(array(
34+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
3535
%w'level' => 'linearizable',
3636
))
3737

38-
MongoDB\Driver\ReadConcern::__set_state(array(
38+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
3939
%w'level' => 'local',
4040
))
4141

42-
MongoDB\Driver\ReadConcern::__set_state(array(
42+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
4343
%w'level' => 'majority',
4444
))
4545

46-
MongoDB\Driver\ReadConcern::__set_state(array(
46+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
4747
%w'level' => 'snapshot',
4848
))
4949

50-
MongoDB\Driver\ReadConcern::__set_state(array(
50+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
5151
))
5252

5353
===DONE===

tests/readConcern/readconcern-var_export-001.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ foreach ($tests as $test) {
2121
?>
2222
===DONE===
2323
<?php exit(0); ?>
24-
--EXPECT--
25-
MongoDB\Driver\ReadConcern::__set_state(array(
24+
--EXPECTF--
25+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
2626
))
27-
MongoDB\Driver\ReadConcern::__set_state(array(
27+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
2828
'level' => 'linearizable',
2929
))
30-
MongoDB\Driver\ReadConcern::__set_state(array(
30+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
3131
'level' => 'local',
3232
))
33-
MongoDB\Driver\ReadConcern::__set_state(array(
33+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
3434
'level' => 'majority',
3535
))
36-
MongoDB\Driver\ReadConcern::__set_state(array(
36+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
3737
'level' => 'available',
3838
))
39-
MongoDB\Driver\ReadConcern::__set_state(array(
39+
%r\\?%rMongoDB\Driver\ReadConcern::__set_state(array(
4040
'level' => 'snapshot',
4141
))
4242
===DONE===

tests/readPreference/readpreference-set_state-001.phpt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,27 @@ foreach ($tests as $fields) {
2626
===DONE===
2727
<?php exit(0); ?>
2828
--EXPECTF--
29-
MongoDB\Driver\ReadPreference::__set_state(array(
29+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
3030
'mode' => 'primary',
3131
))
3232

33-
MongoDB\Driver\ReadPreference::__set_state(array(
33+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
3434
'mode' => 'primaryPreferred',
3535
))
3636

37-
MongoDB\Driver\ReadPreference::__set_state(array(
37+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
3838
'mode' => 'secondary',
3939
))
4040

41-
MongoDB\Driver\ReadPreference::__set_state(array(
41+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
4242
'mode' => 'secondaryPreferred',
4343
))
4444

45-
MongoDB\Driver\ReadPreference::__set_state(array(
45+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
4646
'mode' => 'nearest',
4747
))
4848

49-
MongoDB\Driver\ReadPreference::__set_state(array(
49+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
5050
'mode' => 'secondary',
5151
'tags' =>
5252
array (
@@ -57,7 +57,7 @@ MongoDB\Driver\ReadPreference::__set_state(array(
5757
),
5858
))
5959

60-
MongoDB\Driver\ReadPreference::__set_state(array(
60+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
6161
'mode' => 'secondary',
6262
'tags' =>
6363
array (
@@ -76,7 +76,7 @@ MongoDB\Driver\ReadPreference::__set_state(array(
7676
),
7777
))
7878

79-
MongoDB\Driver\ReadPreference::__set_state(array(
79+
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
8080
'mode' => 'secondary',
8181
'maxStalenessSeconds' => 1000,
8282
))

0 commit comments

Comments
 (0)