Skip to content

Commit 04bd60b

Browse files
committed
Make JavaScript::jsonSerialize() tests portable for libbson 1.5 and 1.6
1 parent 8edd0c9 commit 04bd60b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/bson/bson-javascript-jsonserialize-003.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ var_dump(toPHP(fromJSON($json)));
2020
{"foo":{"$code":"function foo(bar) { return bar; }"}}
2121
object(stdClass)#%d (%d) {
2222
["foo"]=>
23-
object(stdClass)#%d (%d) {
24-
["$code"]=>
23+
object(%r(stdClass|MongoDB\\BSON\\Javascript)%r)#%d (%d) {
24+
["%r(\$?)%rcode"]=>
2525
string(33) "function foo(bar) { return bar; }"
26-
}
26+
%A}
2727
}
2828
===DONE===

tests/bson/bson-javascript-jsonserialize-004.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ var_dump(toPHP(fromJSON($json)));
2020
{"foo":{"$code":"function foo(bar) { return bar; }","$scope":{"foo":42}}}
2121
object(stdClass)#%d (%d) {
2222
["foo"]=>
23-
object(stdClass)#%d (%d) {
24-
["$code"]=>
23+
object(%r(stdClass|MongoDB\\BSON\\Javascript)%r)#%d (%d) {
24+
["%r(\$?)%rcode"]=>
2525
string(33) "function foo(bar) { return bar; }"
26-
["$scope"]=>
26+
["%r(\$?)%rscope"]=>
2727
object(stdClass)#%d (%d) {
2828
["foo"]=>
2929
int(42)

0 commit comments

Comments
 (0)