Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Make test cases pass with PHPC, due to changes in __set_state whitespace output #128

Merged
merged 1 commit into from
Sep 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions tests/MongoDBBSONBinary_set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@ foreach ($tests as $test) {
?>
--EXPECTF--
MongoDB\BSON\Binary::__set_state(array(
'data' => 'foobar',
'type' => 0,
%w'data' => 'foobar',
%w'type' => 0,
))

MongoDB\BSON\Binary::__set_state(array(
'data' => '',
'type' => 0,
%w'data' => '',
%w'type' => 0,
))

MongoDB\BSON\Binary::__set_state(array(
'data' => '' . "\0" . 'foo',
'type' => 0,
%w'data' => '' . "\0" . 'foo',
%w'type' => 0,
))

MongoDB\BSON\Binary::__set_state(array(
'data' => '%a' . "\0" . '' . "\0" . '',
'type' => 4,
%w'data' => '%a' . "\0" . '' . "\0" . '',
%w'type' => 4,
))

MongoDB\BSON\Binary::__set_state(array(
'data' => '%a',
'type' => 5,
%w'data' => '%a',
%w'type' => 5,
))
14 changes: 7 additions & 7 deletions tests/MongoDBBSONDecimal128_set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ foreach ($tests as $value) {
}

?>
--EXPECT--
--EXPECTF--
MongoDB\BSON\Decimal128::__set_state(array(
'dec' => '1234.5678',
%w'dec' => '1234.5678',
))

MongoDB\BSON\Decimal128::__set_state(array(
'dec' => '-1234.5678',
%w'dec' => '-1234.5678',
))

MongoDB\BSON\Decimal128::__set_state(array(
'dec' => 'Infinity',
%w'dec' => 'Infinity',
))

MongoDB\BSON\Decimal128::__set_state(array(
'dec' => 'Infinity',
%w'dec' => 'Infinity',
))

MongoDB\BSON\Decimal128::__set_state(array(
'dec' => 'NaN',
%w'dec' => 'NaN',
))

MongoDB\BSON\Decimal128::__set_state(array(
'dec' => 'NaN',
%w'dec' => 'NaN',
))

22 changes: 11 additions & 11 deletions tests/MongoDBBSONJavascript_set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,36 @@ echo "\n\n";
?>
--EXPECTF--
MongoDB\BSON\Javascript::__set_state(array(
'code' => 'function foo(bar) { return bar; }',
%w'code' => 'function foo(bar) { return bar; }',
))

MongoDB\BSON\Javascript::__set_state(array(
'code' => 'function foo(bar) { return bar; }',
'scope' =>
%w'code' => 'function foo(bar) { return bar; }',
%w'scope' =>
stdClass::__set_state(array(
)),
))

MongoDB\BSON\Javascript::__set_state(array(
'code' => 'function foo() { return foo; }',
'scope' =>
%w'code' => 'function foo() { return foo; }',
%w'scope' =>
stdClass::__set_state(array(
'foo' => 42,
%w'foo' => 42,
)),
))

MongoDB\BSON\Javascript::__set_state(array(
'code' => 'function foo() { return id; }',
'scope' =>
%w'code' => 'function foo() { return id; }',
%w'scope' =>
stdClass::__set_state(array(
'id' =>
%w'id' =>
MongoDB\BSON\ObjectID::__set_state(array(
'oid' => '53e2a1c40640fd72175d4603',
%w'oid' => '53e2a1c40640fd72175d4603',
)),
)),
))

MongoDB\BSON\Javascript::__set_state(array(
'code' => 'function foo(bar) { return bar; }',
%w'code' => 'function foo(bar) { return bar; }',
))

4 changes: 2 additions & 2 deletions tests/MongoDBBSONObjectID_set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var_export(MongoDB\BSON\ObjectID::__set_state([
echo "\n";

?>
--EXPECT--
--EXPECTF--
MongoDB\BSON\ObjectID::__set_state(array(
'oid' => '576c25db6118fd406e6e6471',
%w'oid' => '576c25db6118fd406e6e6471',
))
6 changes: 3 additions & 3 deletions tests/MongoDBBSONRegex_set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ var_export(MongoDB\BSON\Regex::__set_state([
echo "\n";

?>
--EXPECT--
--EXPECTF--
MongoDB\BSON\Regex::__set_state(array(
'pattern' => 'regexp',
'flags' => 'i',
%w'pattern' => 'regexp',
%w'flags' => 'i',
))
14 changes: 7 additions & 7 deletions tests/MongoDBBSONTimestamp_set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ foreach ($tests as $test) {
}

?>
--EXPECT--
--EXPECTF--
MongoDB\BSON\Timestamp::__set_state(array(
'increment' => '1234',
'timestamp' => '5678',
%w'increment' => '1234',
%w'timestamp' => '5678',
))

MongoDB\BSON\Timestamp::__set_state(array(
'increment' => '2147483647',
'timestamp' => '0',
%w'increment' => '2147483647',
%w'timestamp' => '0',
))

MongoDB\BSON\Timestamp::__set_state(array(
'increment' => '0',
'timestamp' => '2147483647',
%w'increment' => '0',
%w'timestamp' => '2147483647',
))

10 changes: 5 additions & 5 deletions tests/MongoDBBSONTimestamp_set_state-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ foreach ($tests as $test) {
}

?>
--EXPECT--
--EXPECTF--
MongoDB\BSON\Timestamp::__set_state(array(
'increment' => '4294967295',
'timestamp' => '0',
%w'increment' => '4294967295',
%w'timestamp' => '0',
))

MongoDB\BSON\Timestamp::__set_state(array(
'increment' => '0',
'timestamp' => '4294967295',
%w'increment' => '0',
%w'timestamp' => '4294967295',
))

6 changes: 3 additions & 3 deletions tests/MongoDBBSONUTCDateTime_set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ foreach ($tests as $milliseconds) {
?>
--EXPECTF--
MongoDB\BSON\UTCDateTime::__set_state(array(
'milliseconds' => %r'?%r0%r'?%r,
%w'milliseconds' => %r'?%r0%r'?%r,
))

MongoDB\BSON\UTCDateTime::__set_state(array(
'milliseconds' => %r'?%r-1416445411987%r'?%r,
%w'milliseconds' => %r'?%r-1416445411987%r'?%r,
))

MongoDB\BSON\UTCDateTime::__set_state(array(
'milliseconds' => %r'?%r1416445411987%r'?%r,
%w'milliseconds' => %r'?%r1416445411987%r'?%r,
))

8 changes: 4 additions & 4 deletions tests/MongoDBBSONUTCDateTime_set_state-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ foreach ($tests as $milliseconds) {
}

?>
--EXPECT--
--EXPECTF--
MongoDB\BSON\UTCDateTime::__set_state(array(
'milliseconds' => '0',
%w'milliseconds' => '0',
))

MongoDB\BSON\UTCDateTime::__set_state(array(
'milliseconds' => '-1416445411987',
%w'milliseconds' => '-1416445411987',
))

MongoDB\BSON\UTCDateTime::__set_state(array(
'milliseconds' => '1416445411987',
%w'milliseconds' => '1416445411987',
))