From 2cd5f09a52fe28ff644827a58ce0f88f177b3f7e Mon Sep 17 00:00:00 2001 From: mattab Date: Wed, 1 Oct 2014 14:51:38 +1300 Subject: Fix one test refs #6313 --- tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorIdAndUserId.php | 8 +++++--- 1 file 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 -- cgit v1.2.3