diff --git a/tests/Type/WebMozartAssert/AssertTypeSpecifyingExtensionTest.php b/tests/Type/WebMozartAssert/AssertTypeSpecifyingExtensionTest.php index fd8a617..625ed38 100644 --- a/tests/Type/WebMozartAssert/AssertTypeSpecifyingExtensionTest.php +++ b/tests/Type/WebMozartAssert/AssertTypeSpecifyingExtensionTest.php @@ -188,6 +188,10 @@ public function testExtension(): void 'Variable $ak is: int', 152, ], + [ + 'Variable $al is: array{foo: mixed, bar: mixed}', + 155, + ], ]); } diff --git a/tests/Type/WebMozartAssert/data/data.php b/tests/Type/WebMozartAssert/data/data.php index 2943149..e2198f4 100644 --- a/tests/Type/WebMozartAssert/data/data.php +++ b/tests/Type/WebMozartAssert/data/data.php @@ -7,7 +7,7 @@ class Foo { - public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k, $l, $m, $n, $o, $p, $r, $s, ?int $t, ?int $u, $x, $aa, array $ab, $ac, $ad, $ae, $af, $ag, array $ah, $ai) + public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k, $l, $m, $n, $o, $p, $r, $s, ?int $t, ?int $u, $x, $aa, array $ab, $ac, $ad, $ae, $af, $ag, array $ah, $ai, $al) { $a; @@ -150,6 +150,11 @@ public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k, Assert::minCount($aj, 1); $ak = array_pop($aj); $ak; + + Assert::keyExists($al, 'foo'); + Assert::keyExists($al, 'bar'); + $al; + } }