Skip to content

Commit 38d9a39

Browse files
committed
Use equals instead of is
1 parent 615bed9 commit 38d9a39

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Browser/Json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __toString(): string
5959
*/
6060
public function assertMatches(string $expression, $expected): self
6161
{
62-
Assert::that($this->search($expression))->is($expected);
62+
Assert::that($this->search($expression))->equals($expected);
6363

6464
return $this;
6565
}

tests/JsonTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,10 @@ public function can_match_json_schema(): void
188188
JSON,
189189
);
190190
}
191+
192+
/** @test */
193+
public function assoc_array_equals()
194+
{
195+
(new Json('{"foo": "bar", "bar": "baz"}'))->assertMatches('@', ['bar' => 'baz', 'foo' => 'bar']);
196+
}
191197
}

0 commit comments

Comments
 (0)