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:
authorStefan Giehl <stefan@matomo.org>2020-03-24 11:14:51 +0300
committerGitHub <noreply@github.com>2020-03-24 11:14:51 +0300
commitdc45e00e44ba2ef1dcb9628ee706b871fc242d0f (patch)
tree69fff8408a08d026f4897706b01264746f4dddc3 /tests/PHPUnit/Fixtures
parenta02376ecf678a9c1678bc9083a2aea69d4842f7d (diff)
Regenerates Omnifixture (#15520)
* updates Omnifixture * fix some namespaces * updates some outdated urls * use correct method * update expected UI files * ensure popover param is not sanitized * try to fix one click update ui test until 4.x stable release * fix jstracker ui test * set now timestamp for realtime test * replace some changing ids to avoid changes on omnifixture update * ui files
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r--tests/PHPUnit/Fixtures/JSTrackingUIFixture.php6
-rw-r--r--tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php4
-rw-r--r--tests/PHPUnit/Fixtures/OmniFixture.php1
-rw-r--r--tests/PHPUnit/Fixtures/UITestFixture.php1
4 files changed, 11 insertions, 1 deletions
diff --git a/tests/PHPUnit/Fixtures/JSTrackingUIFixture.php b/tests/PHPUnit/Fixtures/JSTrackingUIFixture.php
index 9aebb3e0a0..892cf23954 100644
--- a/tests/PHPUnit/Fixtures/JSTrackingUIFixture.php
+++ b/tests/PHPUnit/Fixtures/JSTrackingUIFixture.php
@@ -9,6 +9,8 @@
namespace Piwik\Tests\Fixtures;
+use Piwik\Container\StaticContainer;
+use Piwik\Plugins\CustomJsTracker\TrackerUpdater;
use Piwik\Plugins\GeoIp2\LocationProvider\GeoIp2\Php;
use Piwik\Plugins\PrivacyManager\IPAnonymizer;
use Piwik\Plugins\UserCountry\LocationProvider;
@@ -25,6 +27,9 @@ class JSTrackingUIFixture extends Fixture
self::installAndActivatePlugins($this->getTestEnvironment());
self::updateDatabase();
+ $trackerUpdater = StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackerUpdater');
+ $trackerUpdater->update();
+
// for proper geolocation
LocationProvider::setCurrentProvider(Php::ID);
IPAnonymizer::deactivate();
@@ -38,6 +43,7 @@ class JSTrackingUIFixture extends Fixture
'loadRealTranslations' => 1,
);
$this->extraPluginsToLoad = array(
+ 'CustomJsTracker',
'ExampleTracker',
);
diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php
index 097b2fecbb..0901f3f303 100644
--- a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php
+++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php
@@ -7,6 +7,7 @@
*/
namespace Piwik\Tests\Fixtures;
+use Piwik\Cache;
use Piwik\Date;
use Piwik\Plugins\Annotations\API as APIAnnotations;
use Piwik\Plugins\Goals\API as APIGoals;
@@ -30,9 +31,10 @@ class ManySitesImportedLogsWithXssAttempts extends ManySitesImportedLogs
public function setUp(): void
{
+ $this->addCustomDimensions();
+
parent::setUp();
- $this->addCustomDimensions();
$this->trackVisitWithActionsXss();
$this->trackVisitsForRealtimeMap(Date::factory('2012-08-11 11:22:33'), $createSeperateVisitors = false);
diff --git a/tests/PHPUnit/Fixtures/OmniFixture.php b/tests/PHPUnit/Fixtures/OmniFixture.php
index 10730fc674..aacf4c7347 100644
--- a/tests/PHPUnit/Fixtures/OmniFixture.php
+++ b/tests/PHPUnit/Fixtures/OmniFixture.php
@@ -80,6 +80,7 @@ class OmniFixture extends Fixture
&& $className != "Piwik\\Tests\\Fixtures\\SqlDump"
&& $className != "Piwik\\Tests\\Fixtures\\UpdaterTestFixture"
&& $className != "Piwik\\Tests\\Fixtures\\UITestFixture"
+ && $className != "Piwik\\Tests\\Fixtures\\VisitsInDifferentTimezones"
) {
$klassReflect = new ReflectionClass($className);
diff --git a/tests/PHPUnit/Fixtures/UITestFixture.php b/tests/PHPUnit/Fixtures/UITestFixture.php
index 4fec37fc7a..ab58d6cba9 100644
--- a/tests/PHPUnit/Fixtures/UITestFixture.php
+++ b/tests/PHPUnit/Fixtures/UITestFixture.php
@@ -432,6 +432,7 @@ class UITestFixture extends SqlDump
API::$_autoSuggestLookBack = floor(Date::today()->getTimestamp() - Date::factory('2012-01-01')->getTimestamp()) / (24 * 60 * 60);
return [
+ 'Tests.now' => \DI\decorate(function(){ return Option::get("Tests.forcedNowTimestamp"); }),
'observers.global' => \DI\add([
['Report.addReports', function (&$reports) {
$report = new XssReport();