/** * Setup Shop - Set base url * @return void */ protected function setUp() { if ($this->browserUrl !== null) { $this->setBrowserUrl($this->browserUrl); } parent::setUp(); }
/** * Setup Shop - Set base url * @return void */ protected function setUp() { if (self::$defaultBrowserUrl !== null) { $this->setBrowserUrl(self::$defaultBrowserUrl); } parent::setUp(); }
public function setUp() { parent::setUp(); $this->config->setUp(); // $this->setBrowser('*chrome /usr/bin/firefox'); $this->setBrowser('*chrome'); $this->setBrowserUrl($this->config->getBaseHref()); $this->start(); }
/** * setUp * * @access public * @return void */ public function setUp() { // Import controller //s Yii::import('application.controllers.*'); $this->setBrowser("*firefox"); parent::setUp(); //session_start(); $this->setBrowserUrl('http://localhost/story/index.php/'); }
public function setUp() { foreach (new DirectoryIterator(Zend_Registry::get("datadir") . '/backup') as $file) { if (!$file->isDot() && $file->isFile() && preg_match('/.json$/', $file->getFilename()) === 1) { copy($file->getPathname(), Zend_Registry::get("datadir") . '/' . $file->getFilename()); try { chmod(Zend_Registry::get("datadir") . '/' . $file->getFilename(), '0438'); } catch (Exception $e) { } } } $this->setBrowserUrl($this->bootstrap->getOption('url')); parent::setUp(); }
public function setUp() { parent::setUp(); $this->config->setUp(); if ($this->config->getScreenshotPath() != '' && $this->config->getScreenshotUrl() != '') { $this->screenshotPath = $this->config->getScreenshotPath(); $this->screenshotUrl = $this->config->getScreenshotUrl(); $this->captureScreenshotOnFailure = true; } $this->setHost($this->config->getSeleniumHost()); $this->setPort($this->config->getSeleniumPort()); $this->setBrowser('*chrome'); $this->setBrowserUrl($this->config->getBaseHref()); $this->start(); }
protected function setUp() { parent::setUp(); require_once "{$_SERVER['KERNEL_DIR']}/AppKernel.php"; $this->kernel = new \AppKernel('test', true); $this->kernel->boot(); $this->router = $this->kernel->getContainer()->get('router'); $this->router->getContext()->setHost($_SERVER['HTTP_HOST']); $this->router->getContext()->setBaseUrl($_SERVER['SCRIPT_NAME']); $this->setBrowserUrl("http://{$_SERVER['HTTP_HOST']}"); //$this->setSleep(1); /* $application = new Application($this->kernel); $application->setAutoExit(false); $application->run(new ArrayInput(array('command' => 'doctrine:schema:drop', '--force' => true))); $application->run(new ArrayInput(array('command' => 'doctrine:schema:create'))); $application->run(new ArrayInput(array('command' => 'doctrine:data:load', '--fixtures' => 'src/Acme/PizzaBundle/DataFixtures/ORM/'))); $this->em = $this->kernel->getContainer()->get('doctrine')->getEntityManager(); */ }
protected function setUp() { if (!($cfg = Kwf_Registry::get('testServerConfig'))) { throw new Kwf_Exception("testServerConfig not set"); } Kwf_Util_Apc::callClearCacheByCli(array('type' => 'user')); Kwf_Cache::factory('Core', 'Memcached', array('lifetime' => null, 'automatic_cleaning_factor' => false, 'automatic_serialization' => true))->clean(); $d = $this->_domain; if (!$d) { $domain = $cfg->server->domain; } else { if (!isset($cfg->kwc->domains->{$d})) { throw new Kwf_Exception("Domain '{$d}' not found in config"); } $domain = $cfg->kwc->domains->{$d}->domain; } $this->setBrowserUrl('http://' . $domain . '/'); $this->_unitTestCookie = md5(uniqid('testId', true)); $this->captureScreenshotOnFailure = Kwf_Setup::getConfigSection() == 'vivid-test-server'; $this->screenshotPath = '/mnt/screenshots'; $this->screenshotUrl = 'http://screenshots.vivid'; parent::setUp(); }
/** * @copydoc PHPUnit_Framework_TestCase::setUp() */ protected function setUp() { $screenshotsFolder = 'lib/pkp/tests/results'; $this->screenshotPath = BASE_SYS_DIR . '/' . $screenshotsFolder; $this->screenshotUrl = Config::getVar('general', 'base_url') . '/' . $screenshotsFolder; if (empty(self::$baseUrl)) { $this->markTestSkipped('Please set BASEURL as an environment variable.'); } $this->setTimeout(self::$timeout); // See PKPTestCase::setUp() for an explanation // of this code. if (function_exists('_array_change_key_case')) { global $ADODB_INCLUDED_LIB; $ADODB_INCLUDED_LIB = 1; } // This is not Google Chrome but the Firefox Heightened // Privilege mode required e.g. for file upload. $this->setBrowser('*chrome'); $this->setBrowserUrl(self::$baseUrl . '/'); if (Config::getVar('general', 'installed')) { $affectedTables = $this->getAffectedTables(); if (is_array($affectedTables)) { PKPTestHelper::backupTables($affectedTables, $this); } } $cacheManager = CacheManager::getManager(); $cacheManager->flush(null, CACHE_TYPE_FILE); $cacheManager->flush(null, CACHE_TYPE_OBJECT); // Clear ADODB's cache if (Config::getVar('general', 'installed')) { $userDao = DAORegistry::getDAO('UserDAO'); // As good as any $userDao->flushCache(); } parent::setUp(); }
/** * Sets up the fixture before executing a test method. * If you override this method, make sure the parent implementation is invoked. * Otherwise, the database fixtures will not be managed properly. */ protected function setUp() { parent::setUp(); if (is_array($this->fixtures)) { $this->getFixtureManager()->load($this->fixtures); } }
/** * @return void */ protected function setUp() { parent::setUp(); $fixtureImporter = new Tx_PtExtbase_Testing_Selenium_FixtureFramework_FixtureImporter(); $fixtureImporter->import($this->getFixtures()); }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->setBrowser('*firefox'); $this->setBrowserUrl('http://laravelcommerce.local/'); }
protected function setUp() { parent::setUp(); if (!SELENIUM_ENABLE) { $this->markTestSkipped('Selenium disabled'); } $this->checkConnection(); $this->addMixin('files', 'TestUtils_Mixin_Files'); require_once LIB . '/vendor/faker/faker.php'; Nano_Db::clean(); $this->setUpData(); $this->setBrowserUrl($this->url('/')); $this->start(); $this->windowMaximize(); $this->openAndWait($this->url('/')); $this->deleteAllVisibleCookies(); $this->createCookie('PHPUNIT_SELENIUM_TEST_ID=' . $this->testId, 'path=/'); $this->openPage(); }