Skip to content

PHPC-1263: Fix tests for PHP 7.3 output changes #914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2018
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
12 changes: 6 additions & 6 deletions tests/bson/bson-javascript-set_state-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ MongoDB\BSON\Javascript::__set_state(array(
MongoDB\BSON\Javascript::__set_state(array(
%w'code' => 'function foo(bar) { return bar; }',
%w'scope' =>
stdClass::__set_state(array(
)),
%Sarray(
%S),
))

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

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

MongoDB\BSON\Javascript::__set_state(array(
Expand Down
18 changes: 9 additions & 9 deletions tests/readPreference/readpreference-var_export-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ foreach ($tests as $test) {
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
--EXPECTF--
MongoDB\Driver\ReadPreference::__set_state(array(
'mode' => 'primary',
))
Expand All @@ -48,27 +48,27 @@ MongoDB\Driver\ReadPreference::__set_state(array(
'tags' =>
array (
0 =>
stdClass::__set_state(array(
%Sarray(
'dc' => 'ny',
)),
%S),
),
))
MongoDB\Driver\ReadPreference::__set_state(array(
'mode' => 'secondary',
'tags' =>
array (
0 =>
stdClass::__set_state(array(
%Sarray(
'dc' => 'ny',
)),
%S),
1 =>
stdClass::__set_state(array(
%Sarray(
'dc' => 'sf',
'use' => 'reporting',
)),
%S),
2 =>
stdClass::__set_state(array(
)),
%Sarray(
%S),
),
))
MongoDB\Driver\ReadPreference::__set_state(array(
Expand Down
8 changes: 4 additions & 4 deletions tests/session/session_error-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ foreach ($options as $txnOptions) {
<?php exit(0); ?>
--EXPECTF--
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, integer given
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, int%S given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, MongoDB\Driver\WriteConcern given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "readPreference" option to be MongoDB\Driver\ReadPreference, integer given
Expected "readPreference" option to be MongoDB\Driver\ReadPreference, int%S given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "readPreference" option to be MongoDB\Driver\ReadPreference, MongoDB\Driver\ReadConcern given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, integer given
Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, int%S given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expand All @@ -71,7 +71,7 @@ Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver\ReadPreference given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "defaultTransactionOptions" option to be an array, integer given
Expected "defaultTransactionOptions" option to be an array, int%S given
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
Expected "defaultTransactionOptions" option to be an array, stdClass given
===DONE===