This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using PHPUnit 5.2.9, when running tests all interfaces shown in the report window are marked as having 0% coverage. Since there is no code in these files, they should be either excluded from the report or marked as being 100% covered. The same is true for empty classes (useful with the instanceof operator): class foo extends bar { } The output from PHPUnit, in both cases, shows 0 methods and 0 covered methods.
IMO if the classes are not tested in any tests then their coverage is 0 % and not 100 % (no matter if they are empty or not). But I am open for discussion here but please, first read this blog post [1] (chapter "Improved code coverage report") to ensure that there will be no regression in the current behavior. Closing for now, feel free to reopen. Thanks, Tomas [1] https://blogs.oracle.com/netbeansphp/entry/recent_improvements_in_phpunit_support
Thomas, I have to highly disagree with that. Since interfaces can technically not be tested (that's also why PHPUnit always shows them as "0 of 0 lines covered", I'd argue that they should be considered tested by the code coverage report in NetBeans. Any other reporting tool, including the HTML generated by PHPUnit itself, shows those files as 100% tested.
OK, will have a look at it but cannot promise anything, not sure what _exact_ data we get from PHPUnit. But will try to investigate it. Thanks for reporting.
It would be great if you could attach a sample project (with empty classes, interfaces, traits etc.) together with generated code coverage by PHPUnit (e.g. in some of its subfolder, as an HTML report). Please, use some newer version of PHPUnit. Thanks.