public function run() { $integid = $this->_runner->getArg('kmig', ''); if (empty($integid)) { return true; } else { $params = array(); foreach ($this->_runner->getArgs() as $k => $v) { if (strpos($k, 'kmig-') === 0) { $tmp = explode('kmig-', $k); $k = $tmp[1]; if ($v === true) { $params[] = $k; } else { $params[$k] = $v; } } } $className = KmsCi_Runner_IntegrationTests::getIntegrationClassById($integid, $this->_runner); /** @var KmsCi_Runner_IntegrationTest_Base $integration */ $integration = new $className($this->_runner, $integid); $helper = $this->_getIntegrationHelper($integration); return $helper->runRunnerCommand($params); } }
/** * @param $runner KmsCi_CliRunnerAbstract * @return KmsCi_Runner_IntegrationTest_Base */ public static function getIntegration($runner) { if ($integrationId = getenv('KMSCI_INTEGRATION_ID')) { if (!array_key_exists($integrationId, self::$_integrations)) { $classname = KmsCi_Runner_IntegrationTests::getIntegrationClassById(getenv('KMSCI_INTEGRATION_ID'), $runner); self::$_integrations[$integrationId] = new $classname($runner, getenv('KMSCI_INTEGRATION_ID')); } return self::$_integrations[$integrationId]; } else { return false; } }
public static function getInstanceByIntegrationId($integId) { $runner = KmsCi_Bootstrap::getRunner(); $className = KmsCi_Runner_IntegrationTests::getIntegrationClassById($integId, $runner); $integration = new $className($runner, $integId); return KmsCi_Kmig_IntegrationHelper::getInstance($integration); }