Skip to content

Commit

Permalink
Add regression test for #185
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 authored and ondrejmirtes committed May 23, 2023
1 parent aaf5fe5 commit 23009eb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Type/PHPUnit/data/assert-function.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ public function doFoo($o): void
assertType(self::class, $o);
}

/**
* @template T of object
* @param object $o
* @param class-string<\DateTimeInterface> $class
*/
public function assertInstanceOfWorksWithTemplate($o, $class): void
{
assertInstanceOf($class, $o);
assertType(\DateTimeInterface::class, $o);
}

public function arrayHasNumericKey(array $a): void {
assertArrayHasKey(0, $a);
assertType('array&hasOffset(0)', $a);
Expand Down

0 comments on commit 23009eb

Please sign in to comment.