} else { __c3_error(sprintf("Codeception config file '%s' not found", $config_file)); } try { \Codeception\Configuration::config($config_file); } catch (\Exception $e) { __c3_error($e->getMessage()); } if (!defined('C3_CODECOVERAGE_MEDIATE_STORAGE')) { // workaround for 'zend_mm_heap corrupted' problem gc_disable(); if ((int) ini_get('memory_limit') < 384) { ini_set('memory_limit', '384M'); } define('C3_CODECOVERAGE_MEDIATE_STORAGE', Codeception\Configuration::logDir() . 'c3tmp'); define('C3_CODECOVERAGE_PROJECT_ROOT', Codeception\Configuration::projectDir()); define('C3_CODECOVERAGE_TESTNAME', $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']); function __c3_build_html_report(PHP_CodeCoverage $codeCoverage, $path) { $writer = new PHP_CodeCoverage_Report_HTML(); $writer->process($codeCoverage, $path . 'html'); if (file_exists($path . '.tar')) { unlink($path . '.tar'); } $phar = new PharData($path . '.tar'); $phar->setSignatureAlgorithm(Phar::SHA1); $files = $phar->buildFromDirectory($path . 'html'); array_map('unlink', $files); if (in_array('GZ', Phar::getSupportedCompression())) { if (file_exists($path . '.tar.gz')) { unlink($path . '.tar.gz');