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
Post a Comment