diff --git a/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php b/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php index 47a70c9d02..7a37d76577 100644 --- a/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php @@ -1033,4 +1033,10 @@ public function testBug14596(): void ]); } + public function testClassExistOnCall(): void + { + $this->checkThisOnly = false; + $this->analyse([__DIR__ . '/data/class-exists-on-static-call.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Methods/data/class-exists-on-static-call.php b/tests/PHPStan/Rules/Methods/data/class-exists-on-static-call.php new file mode 100644 index 0000000000..75460611a9 --- /dev/null +++ b/tests/PHPStan/Rules/Methods/data/class-exists-on-static-call.php @@ -0,0 +1,13 @@ +