PHP Code Coverage and Static Private Methods Marked as Uncovered

  • From: "teel" < >
  • To:
  • Subject: PHP Code Coverage and Static Private Methods Marked as Uncovered
  • Date: Thu, 21 Mar 2013 09:15:50 -0400

I'm pretty new to PHPUnit and TDD in general, but code coverage in NetBeans 
seems like a pretty useful tool regarding that. I'm trying to write a test 
for a form validator class I've made.

The class has one public static method and one private static method. The 
public method accepts form data and validation rules as arrays and then 
iterates through the arrays, checking that all rules are met. The private 
method contains a "switch case" with all the code for the different.

When I run my test, the code coverage shows the entire private method as 
uncoverd even though I'm sure at least some should be (and in the public 
method, the calls to the private method are marked as covered).

Is there something I'm doing wrong?






PHP Code Coverage and Static Private Methods Marked as Uncovered

teel 03/21/2013

Re: PHP Code Coverage and Static Private Methods Marked as Uncovered

Tomas Mysik 03/22/2013

PHP Code Coverage and Static Private Methods Marked as Uncovered

teel 03/22/2013

Project Features

About this Project

PHP was started in November 2009, is owned by Petr Jiricka, and has 236 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close