PHPUnit code completion - mac - global phpunit.phar


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 (

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:

Comment actions Permalink

Hi there,

Please have a look at

Also does the ".phar" matter?

Comment actions Permalink

Solved, thanks!

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 :(

Comment actions Permalink

It would be great if you could submit the feature request to our tracking system here: <>.
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.


Please sign in to leave a comment.