-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language Server: Autocomplete for PHPUnit #5210
Comments
Hey @thomasbley, can you reproduce the issue on https://psalm.dev ? |
I think I found my issue: assertTrue is defined as static: public static function assertTrue(). But I call it in class context $this->assertTrue() as advised by the documentation https://phpunit.readthedocs.io/en/9.5/assertions.html#asserttrue A change could be this, but I'm not sure it's good for all cases:
What do you think about it? |
Sorry, again. This is fixed. |
No problem, thanks for fixing this issue! |
I'm using psalm-vscode-plugin v1.2.2 with vs-code 1.52.1 / 1.53.0 (and code-server 3.8.1) and tried to get auto-complete working for phpunit 9.5.2 (loaded as composer library). E.g. $this->assertTrue() cannot be autocompleted from PHPUnit\Framework\TestCase -> PHPUnit\Framework\Assert.
When I type $this->assertTrue() manually, detecting invalid parameters works.
I'm not sure it's related to psalm-vscode-plugin or psalm itself, so I also reported this in psalm/psalm-vscode-plugin#34 .
Happens with psalm 4.4.1 and psalm 4.5.1
The text was updated successfully, but these errors were encountered: