. */ class Coverage extends CI_Controller { function __construct() { date_default_timezone_set('Europe/Paris'); parent::__construct(); // Check if user is logged in or not $this->load->library('DX_Auth'); // if (!getenv('TEST') && !$this->dx_auth->is_logged_in()) { // redirect("auth/login"); // } $this->load->library('PersistentCoverage', '', "cov"); } function index() { $this->load->view('coverage'); } /** * URL to reset the coverage data */ public function reset_coverage() { $this->cov->enable(); echo "coverage enabled" . PHP_EOL; } /** * URL to reset the coverage data */ public function disable_coverage() { $this->cov->disable(); echo "coverage disabled" . PHP_EOL; } /** * Generate the coverage results */ public function coverage_result($format = "html") { $this->cov->coverage_result($format); // echo "coverage $format results generated" . PHP_EOL; // header('http://localhost/gvv2/code-coverage-report/index.html'); } } /* End of file tests.php */ /* Location: ./application/controllers/tests.php */