Skip to content

assertJsonStringEqualsJsonString empty object matches empty array #2919

Closed
@SjorsO

Description

@SjorsO
Q A
PHPUnit version 6.4.4
PHP version 7.1.10
Installation Method Composer

I ran into this issue a few days ago, the following tests pass:

$this->assertJsonStringEqualsJsonString('{}', '[]');

// The test still passes if the object/array is nested deeper
$this->assertJsonStringEqualsJsonString('{"key":{}}', '{"key":[]}');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions