Skip to content

Null not work correctly #82

@lasotaartur

Description

@lasotaartur

I have problem with comparing null value

This works

$factory = new SimpleFactory();
$matcher = $factory->createMatcher();
$json1 = '{"proformaInvoiceLink":null}';
$json2 = '{"proformaInvoiceLink":null}';
 $match = $matcher->match($json1, $json2);

But this not works

$factory = new SimpleFactory();
$matcher = $factory->createMatcher();
$json1 = '{"proformaInvoiceLink":null, "test":"test"}';
$json2 = '{"proformaInvoiceLink":null, "test":"@string@"}';
 $match = $matcher->match($json1, $json2);

When I use @null@ it works

$factory = new SimpleFactory();
$matcher = $factory->createMatcher();
$json1 = '{"proformaInvoiceLink":null, "test":"test"}';
$json2 = '{"proformaInvoiceLink":@null@, "test":"@string@"}';
 $match = $matcher->match($json1, $json2);

I think that second example should works too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions