Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 450bfc0

Browse files
staabmondrejmirtes
authored andcommitted
Added assertArrayHasKey() expectations
1 parent 033f690 commit 450bfc0

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)

AltStyle によって変換されたページ (->オリジナル) /