Skip to content

Commit

Permalink
add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
verfriemelt-dot-org committed Dec 12, 2022
1 parent 0aa9b27 commit 2095c78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/PHPStan/Analyser/NodeScopeResolverTest.php
Expand Up @@ -1136,6 +1136,7 @@ public function dataFileAsserts(): iterable
yield from $this->gatherAssertTypes(__DIR__ . '/data/imagick-pixel.php');
yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Arrays/data/bug-8467a.php');
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-8467b.php');
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-8442.php');
}

/**
Expand Down
8 changes: 8 additions & 0 deletions tests/PHPStan/Analyser/data/bug-8442.php
@@ -0,0 +1,8 @@
<?php declare(strict_types = 1);

namespace Bug8442;

use function PHPStan\Testing\assertType;

assertType('false', \DateInterval::createFromDateString('foo'));
assertType('DateInterval', \DateInterval::createFromDateString('1 Day'));

0 comments on commit 2095c78

Please sign in to comment.