-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Repeat expander in JSON Context (#151)
* Fix Repeat expander in JSON Context Fixes #150 * Add repeat expanders tests * Fix repeat test * Too bad one can't use array universal key inside repeat expander * Fix JSON in tests
- Loading branch information
1 parent
201abf8
commit 5ff1924
Showing
2 changed files
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,6 +150,7 @@ public static function negativePatterns() | |
return [ | ||
['@string@'], | ||
['["Norbert", '], | ||
['@[email protected]({"name": "@string@", "value": "@array@"})'] | ||
]; | ||
} | ||
|
||
|
@@ -215,6 +216,10 @@ public static function positiveMatches() | |
[ | ||
'[{"name": "Norbert","lastName":"Orzechowicz"},{"name":"Michał"},{"name":"Bob"},{"name":"Martin"}]', | ||
'[{"name": "Norbert","@*@":"@*@"},@...@]' | ||
], | ||
[ | ||
'[{"name": "Norbert"},{"name":"Michał"},{"name":"Bob"},{"name":"Martin"}]', | ||
'"@[email protected]({\"name\": \"@string@\"})"' | ||
] | ||
]; | ||
} | ||
|
@@ -242,6 +247,10 @@ public static function negativeMatches() | |
'{"foo":"foo val","bar":"bar val"}', | ||
'{"foo":"foo val"}' | ||
], | ||
[ | ||
'[{"name": "Norbert","lastName":"Orzechowicz"},{"name":"Michał"},{"name":"Bob"},{"name":"Martin"}]', | ||
'"@[email protected]({\"name\": \"@string@\"})"' | ||
], | ||
[ | ||
[], | ||
'[]' | ||
|