Skip to content

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

@maciej-sz

Description

@maciej-sz

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": "@[email protected]()",
      "roles": "@null@||@array@"
    }
  ]
}

and the output contains:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions