From 38d9a39060993d606071fc516e68578c1e0f9b30 Mon Sep 17 00:00:00 2001 From: Flohw Date: Tue, 26 Aug 2025 12:35:52 +0200 Subject: [PATCH 1/3] Use equals instead of is --- src/Browser/Json.php | 2 +- tests/JsonTest.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Browser/Json.php b/src/Browser/Json.php index 00aa71d..c92f6ce 100644 --- a/src/Browser/Json.php +++ b/src/Browser/Json.php @@ -59,7 +59,7 @@ public function __toString(): string */ public function assertMatches(string $expression, $expected): self { - Assert::that($this->search($expression))->is($expected); + Assert::that($this->search($expression))->equals($expected); return $this; } diff --git a/tests/JsonTest.php b/tests/JsonTest.php index 1b45308..6a6cd95 100644 --- a/tests/JsonTest.php +++ b/tests/JsonTest.php @@ -188,4 +188,10 @@ public function can_match_json_schema(): void JSON, ); } + + /** @test */ + public function assoc_array_equals() + { + (new Json('{"foo": "bar", "bar": "baz"}'))->assertMatches('@', ['bar' => 'baz', 'foo' => 'bar']); + } } From 4271ac3de143abfc1a69505761cc882b3dda1061 Mon Sep 17 00:00:00 2001 From: Flohw Date: Tue, 26 Aug 2025 14:01:02 +0200 Subject: [PATCH 2/3] Add php input for php cs fixer --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4175fe..fefe933 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: steps: - uses: zenstruck/.github/actions/php-cs-fixer@main with: + php: 8.4 key: ${{ secrets.GPG_PRIVATE_KEY }} token: ${{ secrets.COMPOSER_TOKEN }} From d2d4d98d456df99b30065addb65ada83473714cd Mon Sep 17 00:00:00 2001 From: Flohw Date: Tue, 26 Aug 2025 14:03:07 +0200 Subject: [PATCH 3/3] Use lowest php version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fefe933..ca412b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: zenstruck/.github/actions/php-cs-fixer@main with: - php: 8.4 + php: 8.0 key: ${{ secrets.GPG_PRIVATE_KEY }} token: ${{ secrets.COMPOSER_TOKEN }}