date = Date::factory($this->dateTime)->toString(); } public function setUp() { $this->setUpWebsitesAndGoals(); $this->trackVisits(); } public function tearDown() { // empty } private function setUpWebsitesAndGoals() { // tests run in UTC, the Tracker in UTC if (!self::siteCreated($idSite = 1)) { self::createWebsite($this->dateTime, $ecommerce = 0, $siteName = false, $siteUrl = false, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, $timezone = 'America/New_York'); } } private function trackVisits() { $dateTime = Date::factory($this->date)->addHour(27); // tracking a visit that is tomorrow in New York time $idSite = $this->idSite; $t = self::getTracker($idSite, $dateTime, $defaultInit = true); // visit that is 'tomorrow' in UTC $t->setUrl('http://example.org/index.htm'); self::checkResponse($t->doTrackPageView('incredible title!')); } }