blob: ac67e3cb0f5912dced89d1e4bcc501efbc166a6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
/**
* Adds one site and tracks one visit w/ pageview URLs that are not normalized.
* These URLs use different protocols and a mix of lowercase & uppercase letters.
*/
class Test_Piwik_Fixture_OneVisitWithAbnormalPageviewUrls extends Test_Piwik_BaseFixture
{
public $dateTime = '2010-03-06 11:22:33';
public $idSite = 1;
public function setUp()
{
$this->setUpWebsitesAndGoals();
$this->trackVisits();
}
public function tearDown()
{
// empty
}
private function setUpWebsitesAndGoals()
{
self::createWebsite($this->dateTime);
}
private function trackVisits()
{
$dateTime = $this->dateTime;
$idSite = $this->idSite;
$t = self::getTracker($idSite, $dateTime, $defaultInit = true, $useThirdPartyCookie = 1);
$t->setUrlReferrer('http://www.google.com/search?q=piwik');
$t->setUrl('http://example.org/foo/bar.html');
self::checkResponse($t->doTrackPageView('http://incredible.title/'));
$t->setUrl('https://example.org/foo/bar.html');
$t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.2)->getDatetime());
self::checkResponse($t->doTrackPageView('https://incredible.title/'));
$t->setUrl('https://wWw.example.org/foo/bar2.html');
$t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.3)->getDatetime());
self::checkResponse($t->doTrackPageView('http://www.incredible.title/'));
$t->setUrl('http://WwW.example.org/foo/bar2.html');
$t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.4)->getDatetime());
self::checkResponse($t->doTrackPageView('https://www.incredible.title/'));
$t->setUrl('http://www.example.org/foo/bar3.html');
$t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.5)->getDatetime());
self::checkResponse($t->doTrackPageView('incredible.title/'));
$t->setUrl('https://example.org/foo/bar4.html');
$t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.6)->getDatetime());
self::checkResponse($t->doTrackPageView('incredible.title/'));
}
}
|