5 months ago

PHPUnit Assert Code Completion

Posted 5 months ago by booni3

I am using Laravel valet and have setup my PHP Storm as follows:

  1. Kept the default phpunit.xml file apart from updating the db_connection to sqlite and db_database to :memory:

  2. PHPUnit is installed with composer and setup in the PHP Storm languages and frameworks. PHPUnit version is showing as 7.4.3 so assume this means it is installed correctly.

  3. Set the default configuration file to phpunit.xml

  4. Set a PHPStorm/PHPUnit Run/Debug Configuration. Se the test runner scope to "Defined in the configuration file".

I can now run tests from within phpstorm and they run correctly.

However, as far as I understand I should now be able to see all the phpunit assertions $this->assertTrue(); within my tests under code completion. I cannot... Any ideas why?

I read about a bug in PHPStorm 2016 where you have to press the spacebar first to get the static methos showing in code completion, but this does not help.

Please sign in or create an account to participate in this conversation.