protected function _getCmd() { $bootstrapfile = $this->_runner->getConfig('testsBootstrapFile', ''); $bootstrapfileparam = empty($bootstrapfile) ? '' : ' --bootstrap ' . escapeshellarg($bootstrapfile); $phpunitcmd = $this->_runner->getEnvironment()->getHelper('php')->getPhpUnit(); $cmd = $phpunitcmd . ' --log-junit ' . escapeshellarg($this->_tmpXmlPath) . $bootstrapfileparam . ' ' . escapeshellarg($this->_classname) . ' ' . escapeshellarg($this->_filename) . ' 2>&1'; return $cmd; }
public function getBin($execName) { $vendorDir = $this->_runner->getConfig('vendorDir', ''); if (!empty($vendorDir) && file_exists($vendorDir . '/bin/' . $execName)) { return $vendorDir . '/bin/' . $execName; } else { $toolsDir = $this->_runner->getConfig('toolsDir', ''); if (!empty($toolsDir) && file_exists($toolsDir . '/' . $execName)) { return $toolsDir . '/' . $execName; } else { return $execName; } } }
public function log($str) { // hide sensitive values $hideKeys = array('password', 'secret', 'login'); $hideKeys = array_merge($hideKeys, $this->_runner->getConfig('hideConfigKeys', array())); foreach ($hideKeys as $k) { foreach ($this->_runner->getConfig() as $ck => $cv) { if (strpos(strtolower($ck), strtolower($k)) !== false) { if (!empty($cv)) { $str = str_replace($cv, '*****', $str); } } } } echo $str . "\n"; return true; }
public function getOutputPath() { return $this->_runner->getConfig('outputPath') . '/' . $this->_integid; }