Skip to content

Commit 7b040d5

Browse files
authored
Add repeat expanders tests
1 parent 201abf8 commit 7b040d5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/Matcher/JsonMatcherTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public static function negativePatterns()
150150
return [
151151
['@string@'],
152152
['["Norbert", '],
153+
['@[email protected]({"name": "@string@", "value": "@array@"})']
153154
];
154155
}
155156

@@ -215,6 +216,14 @@ public static function positiveMatches()
215216
[
216217
'[{"name": "Norbert","lastName":"Orzechowicz"},{"name":"Michał"},{"name":"Bob"},{"name":"Martin"}]',
217218
'[{"name": "Norbert","@*@":"@*@"},@...@]'
219+
],
220+
[
221+
'[{"name": "Norbert"},{"name":"Michał"},{"name":"Bob"},{"name":"Martin"}]',
222+
'@[email protected]({\"name\": \"@string@\"})'
223+
],
224+
[
225+
'[{"name": "Norbert","lastName":"Orzechowicz"},{"name":"Michał"},{"name":"Bob"},{"name":"Martin"}]',
226+
'@[email protected]({\"name\": \"@string@\",\"@*@\":\"@*@\"})'
218227
]
219228
];
220229
}
@@ -242,6 +251,10 @@ public static function negativeMatches()
242251
'{"foo":"foo val","bar":"bar val"}',
243252
'{"foo":"foo val"}'
244253
],
254+
[
255+
'[{"name": "Norbert","lastName":"Orzechowicz"},{"name":"Michał"},{"name":"Bob"},{"name":"Martin"}]',
256+
'@[email protected]({\"name\": \"@string@\"})'
257+
],
245258
[
246259
[],
247260
'[]'

0 commit comments

Comments
 (0)