Skip to content

Commit c2fe3b2

Browse files
committed
Fixed __set_state whitespace compatibility issue with PHPC/HHVM tests
1 parent 4a51f72 commit c2fe3b2

9 files changed

+56
-56
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@ foreach ($tests as $test) {
2424
?>
2525
===DONE===
2626
<?php exit(0); ?>
27-
--EXPECT--
27+
--EXPECTF--
2828
MongoDB\BSON\Binary::__set_state(array(
29-
'data' => 'foobar',
30-
'type' => 0,
29+
%w'data' => 'foobar',
30+
%w'type' => 0,
3131
))
3232

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

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

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

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

5353
===DONE===

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

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

3232
MongoDB\BSON\Decimal128::__set_state(array(
33-
'dec' => '-1234.5678',
33+
%w'dec' => '-1234.5678',
3434
))
3535

3636
MongoDB\BSON\Decimal128::__set_state(array(
37-
'dec' => 'Infinity',
37+
%w'dec' => 'Infinity',
3838
))
3939

4040
MongoDB\BSON\Decimal128::__set_state(array(
41-
'dec' => 'Infinity',
41+
%w'dec' => 'Infinity',
4242
))
4343

4444
MongoDB\BSON\Decimal128::__set_state(array(
45-
'dec' => 'NaN',
45+
%w'dec' => 'NaN',
4646
))
4747

4848
MongoDB\BSON\Decimal128::__set_state(array(
49-
'dec' => 'NaN',
49+
%w'dec' => 'NaN',
5050
))
5151

5252
===DONE===

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

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

3838
MongoDB\BSON\Javascript::__set_state(array(
39-
'code' => 'function foo(bar) { return bar; }',
40-
'scope' =>
39+
%w'code' => 'function foo(bar) { return bar; }',
40+
%w'scope' =>
4141
stdClass::__set_state(array(
4242
)),
4343
))
4444

4545
MongoDB\BSON\Javascript::__set_state(array(
46-
'code' => 'function foo() { return foo; }',
47-
'scope' =>
46+
%w'code' => 'function foo() { return foo; }',
47+
%w'scope' =>
4848
stdClass::__set_state(array(
49-
'foo' => 42,
49+
%w'foo' => 42,
5050
)),
5151
))
5252

5353
MongoDB\BSON\Javascript::__set_state(array(
54-
'code' => 'function foo() { return id; }',
55-
'scope' =>
54+
%w'code' => 'function foo() { return id; }',
55+
%w'scope' =>
5656
stdClass::__set_state(array(
57-
'id' =>
57+
%w'id' =>
5858
MongoDB\BSON\ObjectID::__set_state(array(
59-
'oid' => '53e2a1c40640fd72175d4603',
59+
%w'oid' => '53e2a1c40640fd72175d4603',
6060
)),
6161
)),
6262
))
6363

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

6969
===DONE===

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ MongoDB\BSON\ObjectID::__set_state()
44
<?php
55

66
var_export(MongoDB\BSON\ObjectID::__set_state([
7-
'oid' => '576c25db6118fd406e6e6471',
7+
'oid' => '576c25db6118fd406e6e6471',
88
]));
99
echo "\n";
1010

1111
?>
1212
===DONE===
1313
<?php exit(0); ?>
14-
--EXPECT--
14+
--EXPECTF--
1515
MongoDB\BSON\ObjectID::__set_state(array(
16-
'oid' => '576c25db6118fd406e6e6471',
16+
%w'oid' => '576c25db6118fd406e6e6471',
1717
))
1818
===DONE===

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ echo "\n";
1212
?>
1313
===DONE===
1414
<?php exit(0); ?>
15-
--EXPECT--
15+
--EXPECTF--
1616
MongoDB\BSON\Regex::__set_state(array(
17-
'pattern' => 'regexp',
18-
'flags' => 'i',
17+
%w'pattern' => 'regexp',
18+
%w'flags' => 'i',
1919
))
2020
===DONE===

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ foreach ($tests as $test) {
2222
?>
2323
===DONE===
2424
<?php exit(0); ?>
25-
--EXPECT--
25+
--EXPECTF--
2626
MongoDB\BSON\Timestamp::__set_state(array(
27-
'increment' => '1234',
28-
'timestamp' => '5678',
27+
%w'increment' => '1234',
28+
%w'timestamp' => '5678',
2929
))
3030

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

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

4141
===DONE===

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ foreach ($tests as $test) {
2323
?>
2424
===DONE===
2525
<?php exit(0); ?>
26-
--EXPECT--
26+
--EXPECTF--
2727
MongoDB\BSON\Timestamp::__set_state(array(
28-
'increment' => '4294967295',
29-
'timestamp' => '0',
28+
%w'increment' => '4294967295',
29+
%w'timestamp' => '0',
3030
))
3131

3232
MongoDB\BSON\Timestamp::__set_state(array(
33-
'increment' => '0',
34-
'timestamp' => '4294967295',
33+
%w'increment' => '0',
34+
%w'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
MongoDB\BSON\UTCDateTime::__set_state(array(
24-
'milliseconds' => '0',
24+
%w'milliseconds' => '0',
2525
))
2626

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

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

3535
===DONE===

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ foreach ($tests as $milliseconds) {
2121
?>
2222
===DONE===
2323
<?php exit(0); ?>
24-
--EXPECT--
24+
--EXPECTF--
2525
MongoDB\BSON\UTCDateTime::__set_state(array(
26-
'milliseconds' => '0',
26+
%w'milliseconds' => '0',
2727
))
2828

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

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

3737
===DONE===

0 commit comments

Comments
 (0)