Reputation: 1637
Simple question, how do i cover lines with continue, break, ... with phpUnit and xDebug? System is set up and running, code coverage is generated, all well, but some lines with continue, break and so on are marked as "not covered", so method is marked "not covered", so class is ... you know what.
Example:
if ($taskData['srcType']=='c') {
continue;
}
The Line 'continue;' is marked "not covered.
System: Win7, xDebug 2.2.3, phpUnit 3.7.27
Upvotes: 0
Views: 365
Reputation: 70853
Well, a nasty solution could be to exclude those lines from the code coverage statistics.
Add @codeCoverageIgnoreStart
and @codeCoverageIgnoreEnd
around that line.
Upvotes: 1