You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In project I'm currently working on, we had a following scenario step:
And json response should match:
"""
{
"limit": 10,
"offset": 0,
"count": 1,
"wins": @[email protected](1)
}
"""
and it was throwing me a very weird error: Type pattern "@array@" is not supported by TextMatcher. (RuntimeException).
After investigation it turned out that php-matcher/src/Matcher/Pattern/Assert/Json.php:33 can't recognize this pattern as a valid json value (because of @[email protected](1)) and thats why JSONExpander is being ignored.
The same problem seems to be found here: #83
Perfect solution would be to update Json::transformPattern($pattern) method, to transform patterns with expanders into native strings:
In project I'm currently working on, we had a following scenario step:
and it was throwing me a very weird error:
Type pattern "@array@" is not supported by TextMatcher. (RuntimeException)
.After investigation it turned out that
php-matcher/src/Matcher/Pattern/Assert/Json.php:33
can't recognize this pattern as a valid json value (because of@[email protected](1)
) and thats why JSONExpander is being ignored.The same problem seems to be found here: #83
Perfect solution would be to update
Json::transformPattern($pattern)
method, to transform patterns with expanders into native strings:before transformation:
@[email protected](1)
after transformation:
"@[email protected](1)"
Of course currently this issue can be solved by making sure that all patterns with expanders are stored just like in following example:
The text was updated successfully, but these errors were encountered: