Skip to content

Commit e0cbf37

Browse files
committed
Fix var_export format in tests
1 parent 9511ddf commit e0cbf37

18 files changed

+91
-91
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,28 @@ foreach ($tests as $test) {
2626
<?php exit(0); ?>
2727
--EXPECTF--
2828
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
29-
%w'data' => 'foobar',
30-
%w'type' => 0,
29+
'data' => 'foobar',
30+
'type' => 0,
3131
))
3232

3333
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
34-
%w'data' => '',
35-
%w'type' => 0,
34+
'data' => '',
35+
'type' => 0,
3636
))
3737

3838
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
39-
%w'data' => '' . "\0" . 'foo',
40-
%w'type' => 0,
39+
'data' => '' . "\0" . 'foo',
40+
'type' => 0,
4141
))
4242

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

4848
%r\\?%rMongoDB\BSON\Binary::__set_state(array(
49-
%w'data' => '8Xö"0¬<‘_0fCÆ?',
50-
%w'type' => 5,
49+
'data' => '8Xö"0¬<‘_0fCÆ?',
50+
'type' => 5,
5151
))
5252

5353
===DONE===

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var_dump(eval('return ' . $s . ';'));
1515
<?php exit(0); ?>
1616
--EXPECTF--
1717
%r\\?%rMongoDB\BSON\DBPointer::__set_state(array(
18-
%w'ref' => 'phongo.test',
19-
%w'id' => '5a2e78accd485d55b4050000',
18+
'ref' => 'phongo.test',
19+
'id' => '5a2e78accd485d55b4050000',
2020
))
2121
object(MongoDB\BSON\DBPointer)#%d (%d) {
2222
["ref"]=>

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

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

3030
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
31-
%w'dec' => '-1234.5678',
31+
'dec' => '-1234.5678',
3232
))
3333

3434
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
35-
%w'dec' => 'Infinity',
35+
'dec' => 'Infinity',
3636
))
3737

3838
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
39-
%w'dec' => 'Infinity',
39+
'dec' => 'Infinity',
4040
))
4141

4242
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
43-
%w'dec' => 'NaN',
43+
'dec' => 'NaN',
4444
))
4545

4646
%r\\?%rMongoDB\BSON\Decimal128::__set_state(array(
47-
%w'dec' => 'NaN',
47+
'dec' => 'NaN',
4848
))
4949

5050
===DONE===

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var_dump($o == $document);
2020
<?php exit(0); ?>
2121
--EXPECTF--
2222
%r\\?%rMongoDB\BSON\Document::__set_state(array(
23-
%w'data' => 'TwAAABBfaWQAAQAAAARhcnJheQAeAAAAEDAAAAAAABAxAAEAAAACMgAEAAAAZm9vAAADZG9jdW1lbnQAEgAAAAJmb28ABAAAAGJhcgAAAA==',
23+
'data' => 'TwAAABBfaWQAAQAAAARhcnJheQAeAAAAEDAAAAAAABAxAAEAAAACMgAEAAAAZm9vAAADZG9jdW1lbnQAEgAAAAJmb28ABAAAAGJhcgAAAA==',
2424
))
2525
object(MongoDB\BSON\Document)#%d (%d) {
2626
["data"]=>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var_dump(eval('return ' . $s . ';'));
1515
<?php exit(0); ?>
1616
--EXPECTF--
1717
%r\\?%rMongoDB\BSON\Int64::__set_state(array(
18-
%w'integer' => '2',
18+
'integer' => '2',
1919
))
2020
object(MongoDB\BSON\Int64)#%d (%d) {
2121
["integer"]=>

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,39 @@ echo "\n\n";
3131
<?php exit(0); ?>
3232
--EXPECTF--
3333
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
34-
%w'code' => 'function foo(bar) { return bar; }',
35-
%w'scope' => NULL,
34+
'code' => 'function foo(bar) { return bar; }',
35+
'scope' => NULL,
3636
))
3737

3838
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
39-
%w'code' => 'function foo(bar) { return bar; }',
40-
%w'scope' =>
41-
%Sarray(
42-
%S),
39+
'code' => 'function foo(bar) { return bar; }',
40+
'scope' =>%w
41+
%r\(object\)? %rarray(
42+
%r\)?%r),
4343
))
4444

4545
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
46-
%w'code' => 'function foo() { return foo; }',
47-
%w'scope' =>
48-
%Sarray(
49-
%w'foo' => 42,
50-
%S),
46+
'code' => 'function foo() { return foo; }',
47+
'scope' =>%w
48+
%r\(object\)? %rarray(
49+
'foo' => 42,
50+
%r\)?%r),
5151
))
5252

5353
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
54-
%w'code' => 'function foo() { return id; }',
55-
%w'scope' =>
56-
%Sarray(
57-
%w'id' =>
54+
'code' => 'function foo() { return id; }',
55+
'scope' =>%w
56+
%r\(object\)? %rarray(
57+
'id' =>%w
5858
%r\\?%rMongoDB\BSON\ObjectId::__set_state(array(
59-
%w'oid' => '53e2a1c40640fd72175d4603',
59+
'oid' => '53e2a1c40640fd72175d4603',
6060
)),
61-
%S),
61+
%r\)?%r),
6262
))
6363

6464
%r\\?%rMongoDB\BSON\Javascript::__set_state(array(
65-
%w'code' => 'function foo(bar) { return bar; }',
66-
%w'scope' => NULL,
65+
'code' => 'function foo(bar) { return bar; }',
66+
'scope' => NULL,
6767
))
6868

6969
===DONE===

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var_dump($a == $array);
2020
<?php exit(0); ?>
2121
--EXPECTF--
2222
%r\\?%rMongoDB\BSON\PackedArray::__set_state(array(
23-
%w'data' => 'MwAAABAwAAAAAAAQMQABAAAAAjIABAAAAGZvbwADMwASAAAAAmZvbwAEAAAAYmFyAAAA',
23+
'data' => 'MwAAABAwAAAAAAAQMQABAAAAAjIABAAAAGZvbwADMwASAAAAAmZvbwAEAAAAYmFyAAAA',
2424
))
2525
object(MongoDB\BSON\PackedArray)#%d (%d) {
2626
["data"]=>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo "\n";
1414
<?php exit(0); ?>
1515
--EXPECTF--
1616
%r\\?%rMongoDB\BSON\Regex::__set_state(array(
17-
%w'pattern' => 'regexp',
18-
%w'flags' => 'i',
17+
'pattern' => 'regexp',
18+
'flags' => 'i',
1919
))
2020
===DONE===

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo "\n";
1414
<?php exit(0); ?>
1515
--EXPECTF--
1616
%r\\?%rMongoDB\BSON\Regex::__set_state(array(
17-
%w'pattern' => 'regexp',
18-
%w'flags' => 'ilmsux',
17+
'pattern' => 'regexp',
18+
'flags' => 'ilmsux',
1919
))
2020
===DONE===

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var_dump(eval('return ' . $s . ';'));
1515
<?php exit(0); ?>
1616
--EXPECTF--
1717
%r\\?%rMongoDB\BSON\Symbol::__set_state(array(
18-
%w'symbol' => 'test',
18+
'symbol' => 'test',
1919
))
2020
object(MongoDB\BSON\Symbol)#%d (%d) {
2121
["symbol"]=>

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

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

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

3636
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
37-
%w'increment' => '0',
38-
%w'timestamp' => '2147483647',
37+
'increment' => '0',
38+
'timestamp' => '2147483647',
3939
))
4040

4141
===DONE===

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ foreach ($tests as $test) {
2525
<?php exit(0); ?>
2626
--EXPECTF--
2727
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
28-
%w'increment' => '4294967295',
29-
%w'timestamp' => '0',
28+
'increment' => '4294967295',
29+
'timestamp' => '0',
3030
))
3131

3232
%r\\?%rMongoDB\BSON\Timestamp::__set_state(array(
33-
%w'increment' => '0',
34-
%w'timestamp' => '4294967295',
33+
'increment' => '0',
34+
'timestamp' => '4294967295',
3535
))
3636

3737
===DONE===

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

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

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

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

3535
===DONE===

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

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

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

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

3737
===DONE===

tests/readPreference/readpreference-set_state-001.phpt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,31 @@ foreach ($tests as $fields) {
4848

4949
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
5050
'mode' => 'secondary',
51-
'tags' =>
51+
'tags' =>%w
5252
array (
53-
0 =>
54-
%Sarray(
53+
0 =>%w
54+
%r\(object\)? %rarray(
5555
'dc' => 'ny',
56-
%S),
56+
%r\)?%r),
5757
),
5858
))
5959

6060
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
6161
'mode' => 'secondary',
62-
'tags' =>
62+
'tags' =>%w
6363
array (
64-
0 =>
65-
%Sarray(
64+
0 =>%w
65+
%r\(object\)? %rarray(
6666
'dc' => 'ny',
67-
%S),
68-
1 =>
69-
%Sarray(
67+
%r\)?%r),
68+
1 =>%w
69+
%r\(object\)? %rarray(
7070
'dc' => 'sf',
7171
'use' => 'reporting',
72-
%S),
73-
2 =>
74-
%Sarray(
75-
%S),
72+
%r\)?%r),
73+
2 =>%w
74+
%r\(object\)? %rarray(
75+
%r\)?%r),
7676
),
7777
))
7878

tests/readPreference/readpreference-var_export-001.phpt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,30 @@ foreach ($tests as $test) {
4545
))
4646
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
4747
'mode' => 'secondary',
48-
'tags' =>
48+
'tags' =>%w
4949
array (
50-
0 =>
51-
%Sarray(
50+
0 =>%w
51+
%r\(object\)? %rarray(
5252
'dc' => 'ny',
53-
%S),
53+
%r\)?%r),
5454
),
5555
))
5656
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(
5757
'mode' => 'secondary',
58-
'tags' =>
58+
'tags' =>%w
5959
array (
60-
0 =>
61-
%Sarray(
60+
0 =>%w
61+
%r\(object\)? %rarray(
6262
'dc' => 'ny',
63-
%S),
64-
1 =>
65-
%Sarray(
63+
%r\)?%r),
64+
1 =>%w
65+
%r\(object\)? %rarray(
6666
'dc' => 'sf',
6767
'use' => 'reporting',
68-
%S),
69-
2 =>
70-
%Sarray(
71-
%S),
68+
%r\)?%r),
69+
2 =>%w
70+
%r\(object\)? %rarray(
71+
%r\)?%r),
7272
),
7373
))
7474
%r\\?%rMongoDB\Driver\ReadPreference::__set_state(array(

tests/serverDescription/serverDescription-var_export-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ echo var_export($server->getServerDescription(), true), "\n";
2121
'host' => '%s',
2222
'port' => %d,
2323
'type' => '%r(Standalone|Mongos|RSPrimary|LoadBalancer)%r',
24-
'hello_response' =>
24+
'hello_response' =>%w
2525
array (%A
2626
),
2727
'last_update_time' => %r('\d+'|\d+)%r,

0 commit comments

Comments
 (0)