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 23009eb

Browse files
Jean85ondrejmirtes
authored andcommitted
Add regression test for #185
1 parent aaf5fe5 commit 23009eb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ public function doFoo($o): void
2020
assertType(self::class, $o);
2121
}
2222

23+
/**
24+
* @template T of object
25+
* @param object $o
26+
* @param class-string<\DateTimeInterface> $class
27+
*/
28+
public function assertInstanceOfWorksWithTemplate($o, $class): void
29+
{
30+
assertInstanceOf($class, $o);
31+
assertType(\DateTimeInterface::class, $o);
32+
}
33+
2334
public function arrayHasNumericKey(array $a): void {
2435
assertArrayHasKey(0, $a);
2536
assertType('array&hasOffset(0)', $a);

0 commit comments

Comments
(0)

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