From 63f8699143326ebdf2f5fff97fa8195bc84dc0f2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Nov 2021 17:44:47 +0100 Subject: [PATCH] Add CallLike test for NullsafeMethodCall --- test/PhpParser/Node/Expr/CallableLikeTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/PhpParser/Node/Expr/CallableLikeTest.php b/test/PhpParser/Node/Expr/CallableLikeTest.php index 0dfc19a..43b3e9e 100644 --- a/test/PhpParser/Node/Expr/CallableLikeTest.php +++ b/test/PhpParser/Node/Expr/CallableLikeTest.php @@ -29,8 +29,10 @@ class CallableLikeTest extends \PHPUnit\Framework\TestCase { [new StaticCall(new Name('Test'), 'test', $normalArgs), false], [new StaticCall(new Name('Test'), 'test', $callableArgs), true], [new New_(new Name('Test'), $normalArgs), false], + [new NullsafeMethodCall(new Variable('this'), 'test', $normalArgs), false], // This is not legal code, but accepted by the parser. [new New_(new Name('Test'), $callableArgs), true], + [new NullsafeMethodCall(new Variable('this'), 'test', $callableArgs), true], ]; } } \ No newline at end of file