Hello Bill,

Not yet, please vote for http://youtrack.jetbrains.net/issue/WI-313 or submit a different issue if you like.



Please try my plugin, it can highlight covered lines in the editor.



First you have to set up phpunit to generate a clover xml. Then you set the path to that xml in the plugin's settings, and you're done. If you are using the phpstorm test runner, then the coverage will be displayed after you run the tests. If you execute you tests in a cli or with ssh, the coverage will be displayed when phpstorm finds that the xml file is changed. This happens when you switch task back to phpstorm.


Hi Zsolt!

Thanks for the great plugin - you guys are making PHP development way easier.
Let me ask you something: Is there a way to debug your plugin?

For some reason coverage is not displayed after my tests run.

Here is my setup:
So, as you can see, my clover file is being generated and the plugin is pointing to it. See attached (coverage.xml)
I dont know what I'm missing so maybe if I can debug the plugin I may find the issue and my code may look more green-ish :)

Here is the code that is not being colored (you can see in the xml file that the lines are matching with the function):
Thanks again for your work buddy!


I've written a small guide in the wiki:


I'm sure there's a bug somewhere, I've only tested the windows + samba share and ssh workflow. I haven't tested with phpunit running on windows.
I'll try to debug it myself, when I'll have time. I need to set up a virtual environment for it. (Mac and Linux is tested well with several colleagues, unfortunately we don't use Windows)

If you need more information, I'll be glad to help.


Quick Reply! You rock!
I will give it a try this week and will get in touch if I make anything useful ;)

Thanks again man!



On Windows clover stores filenames in the following way:

  <file name="/C:/path/to/file.php">

So DisplayHandler simply initializes FilenameDisplayMap with the wrong filenames.

For my personal use I've made a quick hack to the CloverXmlReader to convert path to the correct Windows format.

CloverXmlReader.java, Line 32:

  String coveredFilename = element.getAttribute("name").substring(1).replace("/", "\\");

But I think that the right place for doing this transformation is CanonicalDisplayMapDecorator class.

Thanks for the plugin!


Hi Eugene,

On Windows clover stores filenames in the following way:

  <file name="/C:/path/to/file.php">

Actually, that is a PhpStorm issue. If you run the tests using PhpStorm functionality, you will have these paths. But if you run the same tests using phpunit command itself, you will have different paths (in generated xml files). But TBH, even phpunit itself does not generate 100% proper paths .. but at least it works.

1st line generated from PhpStorm and 2nd from command line


Corresponding ticket: http://youtrack.jetbrains.net/issue/WI-9418?projectKey=WI


Hi Andriy,

Thanks for pointing to this bug. But until they fix it, I'll have to use my hack :)


Thanks for the windows-related information guys! I won't need to setup a windows env now.

I'll try to fix it this weekend.


I've fixed this issue, and I've release v0.2.1 of the plugin, it should be available from the repository soon.


Updated and tested on Windows. Works perfectly. Thanks for the plugin!


Works like a charm! Thank you very much!


Please sign in to leave a comment.