Skip to content

Commit

Permalink
Add CallLike test for NullsafeMethodCall
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Nov 14, 2021
1 parent 4122ff3 commit 63f8699
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/PhpParser/Node/Expr/CallableLikeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ public function provideTestIsFirstClassCallable() {
[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],
];
}
}

0 comments on commit 63f8699

Please sign in to comment.