/** * Returns whether the given setting is active/allowed. * * @param string $key * * @return bool */ public function isActive($key) { switch ($key) { case 'codeCoverage': $isActive = extension_loaded('xdebug'); break; case 'runSeleniumTests': $isActive = $this->seleniumService->isSeleniumServerRunning(); break; case 'thisSettingIsAlwaysInactive': $isActive = false; break; default: // If the given setting is not covered by any of the cases, it should be considered active. $isActive = true; } return $isActive; }
/** * Tests if the Selenium RC server is running. * * @return bool TRUE if the server is reachable by opening a socket, FALSE otherwise */ protected function isSeleniumServerRunning() { return $this->seleniumService->isSeleniumServerRunning(); }