diff --git a/tests/MagicMethodAnnotationTest.php b/tests/MagicMethodAnnotationTest.php index 109dc08fd..cd091a263 100644 --- a/tests/MagicMethodAnnotationTest.php +++ b/tests/MagicMethodAnnotationTest.php @@ -960,9 +960,44 @@ class MagicMethodAnnotationTest extends TestCase class B extends A {} function consumeInt(int $i): void {} - /** @psalm-suppress UndefinedMethod */ + /** @psalm-suppress UndefinedMethod, MixedArgument */ consumeInt(B::bar());', ], + 'magicStaticMethodInheritanceWithoutCallStatic_WithReturnAndManyArgs' => [ + // This is compatible with "magicMethodInheritanceWithoutCall_WithReturnAndManyArgs" + 'code' => <<<'PHP' + [ + '$a===' => 'mixed', + ], + ], + 'magicMethodInheritanceWithoutCall_WithReturnAndManyArgs' => [ + 'code' => <<<'PHP' + bar(123, "whatever"); + PHP, + 'assertions' => [ + '$a===' => 'mixed', + ], + ], 'callUsingParent' => [ 'code' => ' 'NonStaticSelfCall', ], + 'suppressUndefinedMethodWithObjectCall_WithNotExistsFunc' => [ + 'code' => <<<'PHP' + bar(function_does_not_exist(123)); + PHP, + 'error_message' => 'UndefinedFunction', + ], + 'suppressUndefinedMethodWithStaticCall_WithNotExistsFunc' => [ + 'code' => <<<'PHP' + 'UndefinedFunction', + ], ]; }