Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-10-01 05:51:38 +0400
committermattab <matthieu.aubry@gmail.com>2014-10-01 05:51:38 +0400
commit2cd5f09a52fe28ff644827a58ce0f88f177b3f7e (patch)
treed2e807584ce8156722aabcb5748c14068ab78115
parentbe25924b5083f17333636df7ddcc4d2f65d97b7f (diff)
Fix one test refs #6313
-rw-r--r--tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorIdAndUserId.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorIdAndUserId.php b/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorIdAndUserId.php
index 7f7fc8c3d1..f039505460 100644
--- a/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorIdAndUserId.php
+++ b/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorIdAndUserId.php
@@ -90,6 +90,7 @@ class FewVisitsWithSetVisitorId extends Fixture
// We create a visit with no User ID.
// When User ID will be set below, then it will UPDATE this visit here that starts without UserID
$t->setForceVisitDateTime(Date::factory($this->dateTime)->addHour(1.9)->getDatetime());
+ $t->setVisitorId('6be121d126d93581');
$t->setUrl('http://example.org/no-user-id-set-but-should-appear-in-user-id-visit');
self::checkResponse($t->doTrackPageView('no User Id set but it should appear in '. $userId .'!'));
@@ -106,17 +107,18 @@ class FewVisitsWithSetVisitorId extends Fixture
// Set User ID
$t->setUserId($userId);
- $this->assertEquals($userId, $t->getUserId());
// User ID takes precedence over any previously set Visitor ID
- $hashUserId = $t->getUserIdHashed($userId);
- $this->assertEquals($hashUserId, $t->getVisitorId());
+ $this->assertEquals($t->getUserIdHashed($userId), $t->getVisitorId());
+ $this->assertEquals('9395988394d4568d', $t->getVisitorId());
+ $this->assertEquals($userId, $t->getUserId());
// Track a pageview with this user id
self::checkResponse($t->doTrackPageView('incredible title!'));
// Track another pageview
$t->setForceVisitDateTime(Date::factory($this->dateTime)->addHour(2.1)->getDatetime());
+ $this->assertEquals($userId, $t->getUserId());
self::checkResponse($t->doTrackPageView('second page'));
// A NEW VISIT WITH A SET USER ID