/** * Runs a test case file. * * @return void */ protected function _runTestCase() { $commandArgs = array('case' => $this->params['case'], 'core' => $this->params['core'], 'app' => $this->params['app'], 'plugin' => $this->params['plugin'], 'codeCoverage' => $this->params['codeCoverage'], 'showPasses' => !empty($this->params['show_passes']), 'baseUrl' => $this->_baseUrl, 'baseDir' => $this->_baseDir); $options = array('--filter', $this->params['filter'], '--output', $this->params['output'], '--fixture', $this->params['fixture']); restore_error_handler(); try { self::time(); $command = new CakeTestSuiteCommand('CakeTestLoader', $commandArgs); $command->run($options); } catch (MissingConnectionException $exception) { ob_end_clean(); $baseDir = $this->_baseDir; include CAKE . 'TestSuite' . DS . 'templates' . DS . 'missing_connection.php'; exit; } }
/** * Runs the test case from $runnerArgs * * @param array $runnerArgs list of arguments as obtained from _parseArgs() * @param array $options list of options as constructed by _runnerOptions() * @return void */ protected function _run($runnerArgs, $options = array()) { restore_error_handler(); restore_error_handler(); $testCli = new CakeTestSuiteCommand('CakeTestLoader', $runnerArgs); $testCli->run($options); }