php - Unreachable statement for PHPUnit achieving 100% Code Coverage -


i let phpunit generate code coverage , xdebug tell lines have not been reached:

public static function execute() {     static $hasrun = false;      if (false == $hasrun)     { // first run: init pat         self::registerautoloader();         self::registerpatincludedir();          $hasrun = true;     }      return $hasrun; } 

this runs before can tested. inner block won't run again. there way reach block in if ? or way make 1 single test in phpunit run first?


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -