Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 /**
  * 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();
 }