PHPUnit code completion - mac - global phpunit.phar

Hi,

I use a global phpunit.phar and fail to get code completion of ie. \PHPUnit_Framework_TestCase. Therefore all my typos of assert* are not corrected ...

Any idea what I can do to have code completion?

Also does the ".phar" matter? As the phpunit installation advices to move it to /usr/local/bin/phpunit (https://phpunit.de/getting-started.html).

PHPStorm: 8.0.1, build: 138.2001
OS: OSX Yosemite 10.10.1
A screenshot with the PHPUnit config is attached.
I read this documentation: https://confluence.jetbrains.com/display/PhpStorm/PHPUnit+support+in+PhpStorm#PHPUnitsupportinPhpStorm-2.EnablingPHPUnitforourproject



Attachment(s):
screenshot1417601062@1X.png
4 comments
Comment actions Permalink

Hi there,

Please have a look at http://stackoverflow.com/a/27251996/783119

Also does the ".phar" matter?

Yes.
0
Comment actions Permalink

Solved, thanks!

0
Comment actions Permalink

I would suggest to update documentation for PHPStorm because there is not a single word about this tricky thing! At least nothing come up after searching for PHPStorm PHPUnit assertion and its mutations.

The solution for anyone else, please add the PHAR file into the project root

After that you are able to use: $this->assert*

Why this is not in documentation :(

0
Comment actions Permalink

It would be great if you could submit the feature request to our tracking system here: <http://youtrack.jetbrains.com/issues/WI#newissue=yes>.
You will be able to receive the answer directly from our developers while other users will be able to write their opinion of your proposal.

0

Please sign in to leave a comment.