diff --git a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php index d496edc9d6..605eb6a5f5 100644 --- a/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/ImpossibleCheckTypeFunctionCallRuleTest.php @@ -573,4 +573,18 @@ public function testConditionalTypesInference(): void ]); } + public function testBug6697(): void + { + $this->checkAlwaysTrueCheckTypeFunctionCall = true; + $this->treatPhpDocTypesAsCertain = true; + $this->analyse([__DIR__ . '/data/bug-6697.php'], []); + } + + public function testBug6443(): void + { + $this->checkAlwaysTrueCheckTypeFunctionCall = true; + $this->treatPhpDocTypesAsCertain = true; + $this->analyse([__DIR__ . '/data/bug-6443.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Comparison/data/bug-6443.php b/tests/PHPStan/Rules/Comparison/data/bug-6443.php new file mode 100644 index 0000000000..e9e4383463 --- /dev/null +++ b/tests/PHPStan/Rules/Comparison/data/bug-6443.php @@ -0,0 +1,23 @@ +