Make PHPStorm understand that WP_UnitTestCase inherits the same functionality as PHPUnit_Framework_TestCase

As it says, the assertEquals and other parts of the testing framework are not showing up as code dependencies.  How do I make this happen?

0
4 comments

I was wondering if you could show what exact inspection warning appears on "assertEquals" from your example.

0

It does not recognize that WP_UnitTestCase extends PHPUnit/TestCase.  This is probably because WP_UnitTestCase is littered from top to bottom with class aliases.  I just want to know how to fix it.

0

Is there a chance you could build a sample project so we could take a look at the classes ourselves? Thank you!

0
Avatar
Permanently deleted user

Got same trouble too, after a whole morning of cursing and head scraping...here's the solution:

 

https://www.jetbrains.com/help/phpstorm/keeping-namespaces-in-compliance-with-psr0-and-psr4.html

 

 

0

Please sign in to leave a comment.