diff --git a/tests/Type/WebMozartAssert/ImpossibleCheckTypeMethodCallRuleTest.php b/tests/Type/WebMozartAssert/ImpossibleCheckTypeMethodCallRuleTest.php index 6c0f804..545b31f 100644 --- a/tests/Type/WebMozartAssert/ImpossibleCheckTypeMethodCallRuleTest.php +++ b/tests/Type/WebMozartAssert/ImpossibleCheckTypeMethodCallRuleTest.php @@ -26,6 +26,16 @@ public function testExtension(): void ]); } + public function testExtensionFalsePositive(): void + { + $this->analyse([__DIR__ . '/data/impossible-check_false-positive.php'], [ + [ + 'Call to static method Webmozart\Assert\Assert::uuid() with \'\' will always evaluate to false.', + 13, + ], + ]); + } + public static function getAdditionalConfigFiles(): array { return [ diff --git a/tests/Type/WebMozartAssert/data/impossible-check_false-positive.php b/tests/Type/WebMozartAssert/data/impossible-check_false-positive.php new file mode 100644 index 0000000..caa83ac --- /dev/null +++ b/tests/Type/WebMozartAssert/data/impossible-check_false-positive.php @@ -0,0 +1,15 @@ +