coduo/php-matcher

Not able to match @null@||@array@

maciej-sz opened this issue · 1 comments

The case is that I am matching optional array, which can be NULL.

A little modified example form php-matcher.norbert.tech (link):

{
  "users": [
    {
      "firstName": "@string@",
      "lastName": "@string@",
      "title": "@string@",
      "created": "@string@.isDateTime()",
      "roles": "@null@||@array@"
    }
  ]
}

and the output contains:

#162 Matcher Coduo\PHPMatcher\Matcher\ScalarMatcher error: "Array(2)" does not match "@array@".