Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • I agree but without using either @codeCoverageIgnore or @covers I experienced that the Code Coverage will drop and the protected/private methods are marked as untested (red). Please have a look at the screenshots (especially the foo() method) in my original question. Do you also experience this and how do you deal with it? Commented Mar 22, 2016 at 6:29
  • No, that's not my experience. In my experience if your test calls a method that calls a private method, both will be covered. Make sure code in your private is actually reached in the test. Commented Mar 22, 2016 at 8:13
  • 2
    Also, I noticed your private methods only assign a value to a local variable. There's something wrong with the way coverage is calculated and the closing bracket is sometimes not included. Since you only have one line method maybe something went wrong there. Try returning from those methods just for verification if anything changes in coverage. Commented Mar 22, 2016 at 8:16