PHPStorm 2016.2.1 / PHPUnit / Declaration
When upgrading to PHPStorm 2016.2.1 I noticed a problem with PHPUnits @covers declaration.
When the @covers declaration doesn't start with backslash it's impossible to go to that declaration.
The following doesn't work anymore; gives a "undefined namespace" on the Module part in the namespace
/**
* @covers \Namespace\Operations\Module\Operation
*/
The following works fine
/**
* @covers Namespace\Operations\Module\Operation
*/
This happens for all of my colleagues when upgrading to 2016.2.1. Can someone else please confirm this?
Is this a bug or should the behaviour be that the namespace should always start with a backslash?
PS: Running tests with coverage works fine with both namespaces.
Please sign in to leave a comment.
Yeah, I can confirm this changed. I believe this was introduced as a part of https://youtrack.jetbrains.com/issue/WI-27561
You can also check https://youtrack.jetbrains.com/issue/WI-18100 for details
On the other hand if you check PhpUnit internals all @covers are followed by leading backslash, i.e. ~/vendor/sebastian/environment/tests/ConsoleTest.php
Alright, thanks for the information.