public function performSetUp($setupEnvironmentOnly = false) { $this->dumpUrl = PIWIK_INCLUDE_PATH . "/tests/UI/resources/piwik1.0.sql.gz"; $this->dropDatabaseInSetUp = true; $this->resetPersistedFixture = true; parent::performSetUp($setupEnvironmentOnly); }
public function performSetUp($setupEnvironmentOnly = false) { parent::performSetUp($setupEnvironmentOnly); $this->createSegments(); $this->setupDashboards(); $visitorIdDeterministic = bin2hex(Db::fetchOne("SELECT idvisitor FROM " . Common::prefixTable('log_visit') . " WHERE idsite = 2 AND location_latitude IS NOT NULL LIMIT 1")); $this->testEnvironment->forcedIdVisitor = $visitorIdDeterministic; $this->testEnvironment->overlayUrl = $this->getLocalTestSiteUrl(); $this->createOverlayTestSite(); $forcedNowTimestamp = Option::get("Tests.forcedNowTimestamp"); if ($forcedNowTimestamp == false) { throw new Exception("Incorrect fixture setup, Tests.forcedNowTimestamp option does not exist! Run the setup again."); } $this->testEnvironment->forcedNowTimestamp = $forcedNowTimestamp; $this->testEnvironment->save(); }
public function performSetUp($setupEnvironmentOnly = false) { $this->extraTestEnvVars = array('loadRealTranslations' => 1); parent::performSetUp($setupEnvironmentOnly); $this->createSegments(); $this->setupDashboards(); $visitorIdDeterministic = bin2hex(Db::fetchOne("SELECT idvisitor FROM " . Common::prefixTable('log_visit') . " WHERE idsite = 2 AND location_latitude IS NOT NULL LIMIT 1")); $this->testEnvironment->forcedIdVisitor = $visitorIdDeterministic; $this->testEnvironment->overlayUrl = $this->getLocalTestSiteUrl(); $this->createOverlayTestSite(); $forcedNowTimestamp = Option::get("Tests.forcedNowTimestamp"); if ($forcedNowTimestamp == false) { throw new Exception("Incorrect fixture setup, Tests.forcedNowTimestamp option does not exist! Run the setup again."); } $this->testEnvironment->forcedNowTimestamp = $forcedNowTimestamp; $this->testEnvironment->save(); // launch archiving so tests don't run out of time print "Archiving in fixture set up..."; VisitsSummaryAPI::getInstance()->get('all', 'year', '2012-08-09'); VisitsSummaryAPI::getInstance()->get('all', 'year', '2012-08-09', urlencode(OmniFixture::DEFAULT_SEGMENT)); print "Done."; }