Skip to content

Commit f086c4c

Browse files
committed
some more tests.
1 parent 6196e54 commit f086c4c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"php": ">=5.6.0"
2020
},
2121
"require-dev": {
22+
"ext-json",
2223
"phpunit/phpunit": "^9.1"
2324
},
2425
"autoload": {

tests/ObjectMergeTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,22 @@ class ObjectMergeTest extends TestCase
9999
'recurse' => true,
100100
'opts' => OBJECT_MERGE_OPT_UNIQUE_ARRAYS,
101101
],
102+
[
103+
'root' => '{"key":{}}',
104+
'others' => ['{"key":{}}'],
105+
'expected' => '{"key":{}}',
106+
],
107+
[
108+
'root' => '{"key":{"nope":"should not be here"}}',
109+
'others' => ['{"key":{}}'],
110+
'expected' => '{"key":{}}',
111+
],
112+
[
113+
'root' => '{"key":{"yep":"i should be here"}}',
114+
'others' => ['{"key":{}}'],
115+
'expected' => '{"key":{"yep":"i should be here"}}',
116+
'recurse' => true,
117+
]
102118
);
103119

104120
/**

0 commit comments

Comments
 (0)