I'm working on a Symfony project and due to most stuff working better in PhpStorm, I decided to move over to using PhpStorm.
If I'm writing PHPUnit tests, I use the following code a bunch of times:
$this->assertTrue($client->getResponse()->isSuccessful());
This is to test whether a route exists. However, PhpStorm gives the following error when hovering over isSuccessful()
:
Method 'isSuccessful() not found in \Symfony\Component\HttpKernel\Response
And when I use $client->getResponse()->
I get no quick select popup to select a method from.
I've tried adding the packages from Symfony that contains the code from $client
and getResponse()
to the External Libraries with PHP Include Path, like this:
However, this still doesn't solve it (this is what I had to do for PHPUnit to make assertTrue
appear in the quick select when using $this->
How do I make this work correctly? I have the Symfony plugin enabled.