protected function setUp() { parent::setUp(); $election = Election::model()->findByPk(1); $election->status = Election::STATUS_REGISTRATION; $election->save(false); }
/** * BACKGROUND: * GIVEN I enabled the "most read articles" block plugin * AND I enabled a metric providing plugin. * * @see PKPTestCase::setUp() */ protected function setUp() { parent::setUp(); // Enable the "most read articles" plugin. $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO'); /* @var $pluginSettingsDao PluginSettingsDAO */ $pluginSettingsDao->updateSetting(2, 'MostReadBlockPlugin', 'enabled', true); $pluginSettingsDao->updateSetting(2, 'MostReadBlockPlugin', 'context', BLOCK_CONTEXT_SIDEBAR); $pluginSettingsDao->updateSetting(2, 'MostReadBlockPlugin', 'seq', 1); // Enable a metric-providing plugin. $pluginSettingsDao->updateSetting(0, 'OasPlugin', 'enabled', true); // Generate test metric data. $dates = array(date('Ymd', strtotime('-15 days')), date('Ymd', strtotime('-45 days')), date('Ymd', strtotime('-2 years'))); $record = array('load_id' => 'most-read-test', 'assoc_type' => ASSOC_TYPE_GALLEY, 'metric_type' => 'oas::counter'); $metricsDao = DAORegistry::getDAO('MetricsDAO'); /* @var $metricsDao MetricsDAO */ foreach ($dates as $date) { $record['day'] = $date; foreach (array('4' => 5, '6' => 10) as $assocId => $metric) { $record['assoc_id'] = $assocId; $record['metric'] = $metric; $metricsDao->insertRecord($record); } } }
public function setUp() { parent::setUp(); $this->pool = $this->getContainer()->get('sonata.admin.pool'); $this->router = $this->getContainer()->get('router'); $this->client = $this->createClientAuthenticated(); $this->dm = $this->getContainer()->get('doctrine_phpcr.odm.default_document_manager'); }
protected function setUp() { parent::setUp(); $this->truncateTables(); $appLogger = $this->appLogger = Yii::app()->getComponent('log')->routes['info_log']; $logFilePath = $this->logFilePath = $appLogger->logPath . '/' . $appLogger->logFile; $this->deleteFile($logFilePath); $identifiersImagesDirPath = $this->identifiersImagesDirPath = Yii::getPathOfAlias('frontend.www') . Yii::app()->getModule('personIdentifier')->imagesDir; // self::removeDirectory($identifiersImagesDirPath); }
protected function setUp() { parent::setUp(); //$this->setAutoStop(false); $this->start(); $this->open(''); // login $this->clickAndWait('link=Login'); $this->type('name=LoginForm[username]', 'admin'); $this->click("//input[@value='Login']"); $this->waitForTextPresent('Password cannot be blank.'); $this->type('name=LoginForm[password]', 'test'); $this->clickAndWait("//input[@value='Login']"); $this->clickAndWait('link=Users'); }
/** * BACKGROUND: * GIVEN I am on the journal settings page step 1 (details) * * @see WebTestCase::setUp() */ protected function setUp() { parent::setUp(); // OJS pages and Selenium locators required for test. $this->pages = array('journal-setup' => array('url' => $this->baseUrl . '/index.php/test/manager/setup/%id'), 'settings' => array('url' => $this->baseUrl . '/index.php/test/manager/plugins', 'doiPrefix' => 'css=input[id^="doiPrefix"]', 'reassignDOIs' => 'css=a[id^="doiSettingsForm-reassignDOIs-button"]', 'formError' => '//ul[@class="pkp_form_error_list"]//a[@href="#%id"]'), 'issue' => array('url' => $this->baseUrl . '/index.php/test/issue/view/%id', 'visible' => '//a[@id="pub-id::doi"]'), 'article' => array('url' => $this->baseUrl . '/index.php/test/article/view/%id', 'visible' => '//a[@id="pub-id::doi"]', 'DC-meta' => '//meta[@name="DC.Identifier.DOI"]@content', 'Google-meta' => '//meta[@name="citation_doi"]@content'), 'article-rt-indexing' => array('url' => $this->baseUrl . '/index.php/test/rt/metadata/%id/0', 'visible' => '//tr/td[text()="Digital Object Identifier"]/../td[last()]'), 'article-rt-citations-apa' => array('url' => $this->baseUrl . '/index.php/test/rt/captureCite/%id/0/ApaCitationPlugin', 'visible' => 'id=citation'), 'galley' => array('url' => $this->baseUrl . '/index.php/test/article/view/%id/1', 'visible' => '//a[@id="pub-id::doi"]', 'DC-meta' => '//meta[@name="DC.Identifier.DOI"]@content', 'Google-meta' => '//meta[@name="citation_doi"]@content'), 'metadata-issue' => array('url' => $this->baseUrl . '/index.php/test/editor/issueData/%id', 'urlSuffix' => 'id=publicIssueId'), 'metadata-article' => array('url' => $this->baseUrl . '/index.php/test/editor/viewMetadata/%id', 'urlSuffixPage' => $this->baseUrl . '/index.php/test/editor/issueToc/%id', 'urlSuffix' => 'name=publishedArticles[1]'), 'metadata-galley' => array('url' => $this->baseUrl . '/index.php/test/editor/editGalley/%id/1', 'urlSuffix' => 'id=publicGalleyId')); // The meta-data pages have uniform structure. foreach ($this->objectTypes as $objectType) { $objectType = strtolower_codesafe($objectType); $this->pages["metadata-{$objectType}"] += array('doi' => '//div[@id="pub-id::doi"]', 'doiInput' => '//div[@id="pub-id::doi"]//input', 'formError' => '//ul[@class="pkp_form_error_list"]//a[@href="#%id"]'); } // Start Selenium. $this->start(); // Log in to OJS as admin. $this->logIn(); // Open the DOI settings page. $this->openSettingsPage(); }
/** * @see WebTestCase::setUp() */ protected function setUp() { parent::setUp(); // OJS pages and Selenium locators required for test. // the setup page // there coul be several pages for a object type // metadata pages $this->pages = array('journal-setup' => array('url' => $this->baseUrl . '/index.php/test/manager/setup/%id'), 'settings' => array('url' => $this->baseUrl . '/index.php/test/manager/plugin/pubIds/URNPubIdPlugin/settings', 'urnPrefix' => 'id=urnPrefix', 'clearURNs' => 'name=clearPubIds', 'formError' => '//ul[@class="pkp_form_error_list"]//a[@href="#%id"]'), 'issue' => array(array('url' => $this->baseUrl . '/index.php/test/issue/view/%id', 'visible' => '//a[@id="pub-id::other::urn"]')), 'article' => array(array('url' => $this->baseUrl . '/index.php/test/article/view/%id', 'visible' => '//a[@id="pub-id::other::urn"]', 'DC-meta' => '//meta[@name="DC.Identifier.URN"]@content', 'Google-meta' => '//meta[@name="citation_urn"]@content'), array('url' => $this->baseUrl . '/index.php/test/rt/metadata/%id/0', 'visible' => '//tr/td[text()="Uniform Resource Name"]/../td[last()]')), 'galley' => array(array('url' => $this->baseUrl . '/index.php/test/article/view/%id/1', 'visible' => '//a[@id="pub-id::other::urn"]', 'DC-meta' => '//meta[@name="DC.Identifier.URN"]@content', 'Google-meta' => '//meta[@name="citation_urn"]@content')), 'suppfile' => array(array('url' => $this->baseUrl . '/index.php/test/rt/suppFileMetadata/%id/0/1', 'visible' => '//tr/td[text()="Uniform Resource Name"]/../td[last()]')), 'metadata-issue' => array('url' => $this->baseUrl . '/index.php/test/editor/issueData/%id', 'urlSuffix' => 'id=publicIssueId'), 'metadata-article' => array('url' => $this->baseUrl . '/index.php/test/editor/viewMetadata/%id', 'urlSuffixPage' => $this->baseUrl . '/index.php/test/editor/issueToc/1', 'urlSuffix' => 'name=publishedArticles[1]'), 'metadata-galley' => array('url' => $this->baseUrl . '/index.php/test/editor/editGalley/%id/1', 'urlSuffix' => 'id=publicGalleyId'), 'metadata-suppfile' => array('url' => $this->baseUrl . '/index.php/test/editor/editSuppFile/%id/1', 'urlSuffix' => 'id=publicSuppFileId')); // The meta-data pages have uniform structure. foreach ($this->objectTypes as $objectType) { $objectType = strtolower($objectType); $this->pages["metadata-{$objectType}"] += array('urn' => '//div[@id="pub-id::other::urn"]', 'urnInput' => '//div[@id="pub-id::other::urn"]//input[@name="urnSuffix"]', 'formError' => '//ul[@class="pkp_form_error_list"]//a[@href="#urnSuffix"]'); } // Start Selenium. $this->start(); // Log in to OJS as admin. $this->logIn(); // Open the settings page step 1 (details). $this->openSettingsPage(); }
protected function setUp() { parent::setUp(); $this->deleteTmpDir('ORM'); }
/** * @see WebTestCase::setUp() */ protected function setUp() { parent::setUp(); $this->editorBasePath = $this->baseUrl . '/index.php/lucene-test/editor/'; }
protected function setUp() { parent::setUp(); $this->orderFixture = $this->manager->loadFixture('sales/quote'); }
protected function setUp() { parent::setUp(); $this->addressFixture = $this->manager->loadFixture('customer/address'); }
protected function setUp() { parent::setUp(); $this->deleteTmpDir('SessionTest'); }
public function setUp() { $this->servicio = new Servicios(); parent::setUp(); }
protected function setUp() { parent::setUp(); $this->deleteTmpDir('Serializer'); }
public function setUp() { $this->getFixtureManager()->basePath = Yii::getPathOfAlias('application.modules.pages.tests.fixtures'); parent::setUp(); }
protected function setUp() { parent::setUp(); $this->getRequestUrl('http://localhost/'); }
public function setUp() { parent::setUp(); $this->client = $this->createClient(); }
public function setUp() { parent::setUp(); $this->old_include_path = set_include_path('../conf' . PATH_SEPARATOR . get_include_path()); }
public function setUp() { parent::setUp(); $this->base_url .= '/api/games'; }
function setUp() { $this->addHeader("User-Agent:" . USER_AGENT); parent::setUp(); }
protected function setUp() { parent::setUp(); $this->getRequestUrl('http://localhost/coco'); $app = \Staq\App::create($this->projectNamespace)->setPlatform('local'); }
protected function setUp() { parent::setUp(); }
protected function setUp() { parent::setUp(); $this->productFixture = $this->manager->loadFixture('catalog/product'); }
public function setUp() { parent::setUp(); self::$walletName = 'alice_test'; self::$walletSamplesBaseUrl = self::baseUrl() . basename(__DIR__) . '/'; }
protected function setUp() { parent::setUp(); $this->deleteTmpDir('StandardFormLogin'); }
protected function setUp() { $this->client = self::createClient(array('test_case' => 'Basic', 'root_config' => 'config.yml'), array('PHP_AUTH_USER' => 'user', 'PHP_AUTH_PW' => 'user')); parent::setUp(); }