Skip to content

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

Diff for: tests/Type/PHPUnit/data/assert-function.php

+11
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)