diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-01-20 06:15:15 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-01-20 06:15:15 +0400 |
commit | b5cf6ac887a841a836a2db028c8e59be4ad7578c (patch) | |
tree | 3209a79d56b040bcdb1f41ad76540b10c7f8fa65 /tests | |
parent | 9c7cfe68f969e41bff22affdde4e306e20bc7ea3 (diff) |
Re-add Visitor Profile screenshot by making omniFixture work with deterministic visitor id for the screenshot
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php | 5 | ||||
-rw-r--r-- | tests/PHPUnit/Fixtures/OmniFixture.php | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php index ea78fba9c1..9478a64ea7 100644 --- a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php +++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php @@ -23,7 +23,6 @@ require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Fixtures/ManySitesImportedLogs class Test_Piwik_Fixture_ManySitesImportedLogsWithXssAttempts extends Test_Piwik_Fixture_ManySitesImportedLogs { public $now = null; - public $visitorIdForDeterministicDate = null; public function __construct() { @@ -36,10 +35,6 @@ class Test_Piwik_Fixture_ManySitesImportedLogsWithXssAttempts extends Test_Piwik $this->trackVisitsForRealtimeMap(Date::factory('2012-08-11 11:22:33'), $createSeperateVisitors = false); - $this->visitorIdForDeterministicDate = bin2hex(Db::fetchOne( - "SELECT idvisitor FROM " . Common::prefixTable('log_visit') - . " WHERE idsite = 2 AND location_latitude IS NOT NULL LIMIT 1")); - $this->setupDashboards(); $this->setupXssSegment(); $this->addAnnotations(); diff --git a/tests/PHPUnit/Fixtures/OmniFixture.php b/tests/PHPUnit/Fixtures/OmniFixture.php index 061f2f4e4b..7b2c117334 100644 --- a/tests/PHPUnit/Fixtures/OmniFixture.php +++ b/tests/PHPUnit/Fixtures/OmniFixture.php @@ -20,6 +20,9 @@ class Test_Piwik_Fixture_OmniFixture extends Test_Piwik_BaseFixture public $dateTime = '2012-02-01'; public $now = null; + // Visitor profile screenshot test needs visitor id + public $visitorIdDeterministic = null; + public $fixtures = array(); /** @@ -70,6 +73,11 @@ class Test_Piwik_Fixture_OmniFixture extends Test_Piwik_BaseFixture foreach ($this->fixtures as $name => $fixture) { $fixture->setUp(); } + + $this->visitorIdDeterministic = bin2hex(\Piwik\Db::fetchOne( + "SELECT idvisitor FROM " . \Piwik\Common::prefixTable('log_visit') + . " WHERE idsite = 2 AND location_latitude IS NOT NULL LIMIT 1")); + } public function tearDown() |