Skip to content
Extraits de code Groupes Projets
Valider 2cd5f09a rédigé par mattab's avatar mattab
Parcourir les fichiers

Fix one test refs #6313

parent be25924b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -90,6 +90,7 @@ class FewVisitsWithSetVisitorId extends Fixture ...@@ -90,6 +90,7 @@ class FewVisitsWithSetVisitorId extends Fixture
// We create a visit with no User ID. // 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 // 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->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'); $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 .'!')); self::checkResponse($t->doTrackPageView('no User Id set but it should appear in '. $userId .'!'));
...@@ -106,17 +107,18 @@ class FewVisitsWithSetVisitorId extends Fixture ...@@ -106,17 +107,18 @@ class FewVisitsWithSetVisitorId extends Fixture
// Set User ID // Set User ID
$t->setUserId($userId); $t->setUserId($userId);
$this->assertEquals($userId, $t->getUserId());
// User ID takes precedence over any previously set Visitor ID // User ID takes precedence over any previously set Visitor ID
$hashUserId = $t->getUserIdHashed($userId); $this->assertEquals($t->getUserIdHashed($userId), $t->getVisitorId());
$this->assertEquals($hashUserId, $t->getVisitorId()); $this->assertEquals('9395988394d4568d', $t->getVisitorId());
$this->assertEquals($userId, $t->getUserId());
// Track a pageview with this user id // Track a pageview with this user id
self::checkResponse($t->doTrackPageView('incredible title!')); self::checkResponse($t->doTrackPageView('incredible title!'));
// Track another pageview // Track another pageview
$t->setForceVisitDateTime(Date::factory($this->dateTime)->addHour(2.1)->getDatetime()); $t->setForceVisitDateTime(Date::factory($this->dateTime)->addHour(2.1)->getDatetime());
$this->assertEquals($userId, $t->getUserId());
self::checkResponse($t->doTrackPageView('second page')); self::checkResponse($t->doTrackPageView('second page'));
// A NEW VISIT WITH A SET USER ID // A NEW VISIT WITH A SET USER ID
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter