Skip to content

Commit 9b9bc22

Browse files
committed
Added assertArrayHasKey() expectations
1 parent 033f690 commit 9b9bc22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/Type/PHPUnit/data/assert-function.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use function PHPUnit\Framework\assertNotCount;
1212
use function PHPUnit\Framework\assertEmpty;
1313
use function PHPUnit\Framework\assertInstanceOf;
14-
use function PHPUnit\Framework\assertObjectHasAttribute;
1514

1615
class Foo
1716
{
@@ -53,6 +52,12 @@ public function arrayHasStringKey(array $a, \ArrayAccess $b): void
5352
assertType("ArrayAccess", $b);
5453
}
5554

55+
public function arrayHasExprKey(int $index, array $a): void
56+
{
57+
assertArrayHasKey($index, $a);
58+
assertType("non-empty-array", $a);
59+
}
60+
5661
public function testEmpty($a): void
5762
{
5863
assertEmpty($a);

0 commit comments

Comments
 (0)