Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #3695 Add
@codeCoverageIgnore
to untestable compiled method…
…s (markhuot) This PR was merged into the 3.x branch. Discussion ---------- Add `@codeCoverageIgnore` to untestable compiled methods I've been experimenting with adding my compiled templates to my code coverage reports and it works largely as expected. Templates that get executed return percentages accurate to the number of lines the tests actually cover. The only exception are the "meta" methods on the compiled template that aren't necessarily called by the tests. This PR adds ``@codeCoverageIgnore`` comments to the compiled template for all non-display methods so the coverage report only lists lines from `doDisplay`. I'm assuming that I will need to update some of the Twig tests to account for these new comments, but am curious if you'd be open to this change. An example screenshot below. The last line shows line 46 out of the compiled template is never executed. The compiled template's `getDebugInfo` even correctly informs me that line 46 maps to line 4 in my `.twig` so I'll work on updating the line numbering next. ![image](https://user-images.githubusercontent.com/48975/166098890-fbaf99ad-9aa4-4430-9f82-050f482a6777.png) Commits ------- 1cf610b Add `@codeCoverageIgnore` to untestable compiled methods
- Loading branch information