function main() { echo "About to enable\n"; doenable(); echo "Done enabling\n"; f(); $r = fb_disable_code_coverage(); var_dump($r); }
function main() { echo "About to enable\n"; doenable(); echo "Done enabling\n"; f(); $r = fb_disable_code_coverage(); unset($r['systemlib.phpfb']); var_dump($r); }
/** * Stops code coverage. * * @return array The collected coverage */ public function stop() { $data = fb_get_code_coverage($this->_config['cleanup']); fb_disable_code_coverage(); $result = []; foreach ($data as $file => $coverage) { foreach ($coverage as $line => $value) { if ($line && $value !== -2) { $result[$file][$line - 1] = $value === -1 ? 0 : $value; } } } return $result; }
/** * {@inheritdoc} */ public function stop() { $codeCoverage = fb_get_code_coverage(true); fb_disable_code_coverage(); return $codeCoverage; }
function test($a) { fb_enable_code_coverage(); var_dump(array_map(null, $a)); fb_disable_code_coverage(); }
/** * Stop collection of code coverage information. * * @return array */ protected function doStop() { $data = fb_get_code_coverage(TRUE); fb_disable_code_coverage(); return $data; }
function test($t) { fb_enable_code_coverage(); var_dump($t); fb_disable_code_coverage(); }