Skip to content

Commit 98e583b

Browse files
committed
PHPC-1175: Fixed test cases due to changes in variable type names in PHP 7.3
1 parent 197f3f7 commit 98e583b

8 files changed

+30
-30
lines changed

tests/bson/bson-fromPHP_error-001.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ foreach ($invalidValues as $invalidValue) {
4848
--EXPECTF--
4949
Testing top-level objects
5050
Expected MyDocument::bsonSerialize() to return an array or stdClass, %r(null|NULL)%r given
51-
Expected MyDocument::bsonSerialize() to return an array or stdClass, integer given
51+
Expected MyDocument::bsonSerialize() to return an array or stdClass, int%S given
5252
Expected MyDocument::bsonSerialize() to return an array or stdClass, string given
53-
Expected MyDocument::bsonSerialize() to return an array or stdClass, boolean given
53+
Expected MyDocument::bsonSerialize() to return an array or stdClass, bool%S given
5454
Expected MyDocument::bsonSerialize() to return an array or stdClass, MyDocument given
5555

5656
Testing nested objects
5757
Expected MyDocument::bsonSerialize() to return an array or stdClass, %r(null|NULL)%r given
58-
Expected MyDocument::bsonSerialize() to return an array or stdClass, integer given
58+
Expected MyDocument::bsonSerialize() to return an array or stdClass, int%S given
5959
Expected MyDocument::bsonSerialize() to return an array or stdClass, string given
60-
Expected MyDocument::bsonSerialize() to return an array or stdClass, boolean given
60+
Expected MyDocument::bsonSerialize() to return an array or stdClass, bool%S given
6161
Expected MyDocument::bsonSerialize() to return an array or stdClass, MyDocument given
6262
===DONE===

tests/bson/bson-timestamp_error-006.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Expected increment to be an unsigned 32-bit integer or string, %r(null|NULL)%r g
2828
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
2929
Expected increment to be an unsigned 32-bit integer or string, %r(double|float)%r given
3030
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
31-
Expected increment to be an unsigned 32-bit integer or string, boolean given
31+
Expected increment to be an unsigned 32-bit integer or string, bool%S given
3232
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3333
Expected increment to be an unsigned 32-bit integer or string, array given
3434
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
@@ -38,7 +38,7 @@ Expected timestamp to be an unsigned 32-bit integer or string, %r(null|NULL)%r g
3838
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3939
Expected timestamp to be an unsigned 32-bit integer or string, %r(double|float)%r given
4040
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
41-
Expected timestamp to be an unsigned 32-bit integer or string, boolean given
41+
Expected timestamp to be an unsigned 32-bit integer or string, bool%S given
4242
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
4343
Expected timestamp to be an unsigned 32-bit integer or string, array given
4444
OK: Got MongoDB\Driver\Exception\InvalidArgumentException

tests/bson/bson-utcdatetime_error-004.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ foreach ($invalidValues as $invalidValue) {
1919
?>
2020
===DONE===
2121
<?php exit(0); ?>
22-
--EXPECT--
22+
--EXPECTF--
2323
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
24-
Expected integer or string, boolean given
24+
Expected integer or string, bool%S given
2525
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
2626
Expected integer or string, array given
2727
===DONE===

tests/bulk/bulkwrite-delete_error-001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo throws(function() use ($bulk) {
1414
?>
1515
===DONE===
1616
<?php exit(0); ?>
17-
--EXPECT--
17+
--EXPECTF--
1818
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
19-
Expected "collation" option to be array or object, integer given
19+
Expected "collation" option to be array or object, int%S given
2020
===DONE===

tests/bulk/bulkwrite-update_error-003.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ echo throws(function() use ($bulk) {
2222
?>
2323
===DONE===
2424
<?php exit(0); ?>
25-
--EXPECT--
25+
--EXPECTF--
2626
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
2727
Replacement document conflicts with true "multi" option
2828

2929
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
30-
Expected "collation" option to be array or object, integer given
30+
Expected "collation" option to be array or object, int%S given
3131

3232
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
33-
Expected "collation" option to be array or object, integer given
33+
Expected "collation" option to be array or object, int%S given
3434
===DONE===

tests/query/query-ctor_error-001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ foreach ($tests as $test) {
2525
<?php exit(0); ?>
2626
--EXPECTF--
2727
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
28-
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, integer given
28+
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, int%S given
2929
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3030
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, %r(double|float)%r given
3131
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3232
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given
3333
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
34-
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, boolean given
34+
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, bool%S given
3535
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3636
Expected "readConcern" option to be MongoDB\Driver\ReadConcern, array given
3737
OK: Got MongoDB\Driver\Exception\InvalidArgumentException

tests/query/query-ctor_error-002.phpt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,44 @@ foreach ($tests as $options) {
3030
?>
3131
===DONE===
3232
<?php exit(0); ?>
33-
--EXPECT--
33+
--EXPECTF--
3434
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
35-
Expected "modifiers" option to be array, integer given
35+
Expected "modifiers" option to be array, int%S given
3636

3737
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
38-
Expected "collation" option to be array or object, integer given
38+
Expected "collation" option to be array or object, int%S given
3939

4040
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
41-
Expected "comment" option to be string, integer given
41+
Expected "comment" option to be string, int%S given
4242

4343
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
44-
Expected "hint" option to be string, array, or object, integer given
44+
Expected "hint" option to be string, array, or object, int%S given
4545

4646
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
47-
Expected "max" option to be array or object, integer given
47+
Expected "max" option to be array or object, int%S given
4848

4949
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
50-
Expected "min" option to be array or object, integer given
50+
Expected "min" option to be array or object, int%S given
5151

5252
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
53-
Expected "projection" option to be array or object, integer given
53+
Expected "projection" option to be array or object, int%S given
5454

5555
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
56-
Expected "sort" option to be array or object, integer given
56+
Expected "sort" option to be array or object, int%S given
5757

5858
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
59-
Expected "$comment" modifier to be string, integer given
59+
Expected "$comment" modifier to be string, int%S given
6060

6161
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
62-
Expected "$hint" modifier to be string, array, or object, integer given
62+
Expected "$hint" modifier to be string, array, or object, int%S given
6363

6464
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
65-
Expected "$max" modifier to be array or object, integer given
65+
Expected "$max" modifier to be array or object, int%S given
6666

6767
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
68-
Expected "$min" modifier to be array or object, integer given
68+
Expected "$min" modifier to be array or object, int%S given
6969

7070
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
71-
Expected "$orderby" modifier to be array or object, integer given
71+
Expected "$orderby" modifier to be array or object, int%S given
7272

7373
===DONE===

tests/writeConcern/writeconcern-ctor_error-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ foreach ($tests as $test) {
2626
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
2727
Expected w to be integer or string, %r(double|float)%r given
2828
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
29-
Expected w to be integer or string, boolean given
29+
Expected w to be integer or string, bool%S given
3030
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3131
Expected w to be integer or string, array given
3232
OK: Got MongoDB\Driver\Exception\InvalidArgumentException

0 commit comments

Comments
 (0)