/** * @param string|null $name */ public function __construct($name = NULL) { parent::__construct($name); $this->settings = new CiviSeleniumSettings(); if (property_exists($this->settings, 'serverStartupTimeOut') && $this->settings->serverStartupTimeOut) { global $CiviSeleniumTestCase_polled; if (!$CiviSeleniumTestCase_polled) { $CiviSeleniumTestCase_polled = TRUE; CRM_Utils_Network::waitForServiceStartup($this->drivers[0]->getHost(), $this->drivers[0]->getPort(), $this->settings->serverStartupTimeOut); } } }
/** * Constructor. * * Because we are overriding the parent class constructor, we * need to show the same arguments as exist in the constructor of * PHPUnit_Framework_TestCase, since * PHPUnit_Framework_TestSuite::createTest() creates a * ReflectionClass of the Test class and checks the constructor * of that class to decide how to set up the test. * * @param string $name * @param array $data * @param string $dataName * @param array $browser */ public function __construct($name = NULL, array $data = array(), $dataName = '', array $browser = array()) { parent::__construct($name, $data, $dataName, $browser); $this->loggedInAs = NULL; $this->settings = new CiviSeleniumSettings(); if (property_exists($this->settings, 'serverStartupTimeOut') && $this->settings->serverStartupTimeOut) { global $CiviSeleniumTestCase_polled; if (!$CiviSeleniumTestCase_polled) { $CiviSeleniumTestCase_polled = TRUE; CRM_Utils_Network::waitForServiceStartup($this->drivers[0]->getHost(), $this->drivers[0]->getPort(), $this->settings->serverStartupTimeOut); } } // autoload require_once 'CRM/Core/ClassLoader.php'; CRM_Core_ClassLoader::singleton()->register(); // also initialize a connection to the db // FIXME: not necessary for most tests, consider moving into functions that need this $config = CRM_Core_Config::singleton(); }