diff --git a/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php b/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php index 0a78d5dfd5..944ef5ebc1 100644 --- a/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php +++ b/tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php @@ -3646,6 +3646,16 @@ public function testBug5642(): void ]); } + public function testBug13267(): void + { + $this->checkThisOnly = false; + $this->checkNullables = false; + $this->checkUnionTypes = true; + $this->checkExplicitMixed = false; + + $this->analyse([__DIR__ . '/data/bug-13267.php'], []); + } + public function testBug3396(): void { $this->checkThisOnly = false; diff --git a/tests/PHPStan/Rules/Methods/data/bug-13267.php b/tests/PHPStan/Rules/Methods/data/bug-13267.php new file mode 100644 index 0000000000..f49948300e --- /dev/null +++ b/tests/PHPStan/Rules/Methods/data/bug-13267.php @@ -0,0 +1,16 @@ +getMessage(), + $e->getCode(), + 1, + $e->getFile(), + $e->getLine(), + $e->getPrevious(), + ); + } +}