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
path: root/tests
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-12-21 11:27:52 +0300
committerGitHub <noreply@github.com>2021-12-21 11:27:52 +0300
commit29dabc0f6d3069b01d85a6d0b7b5637c31bc181e (patch)
treedebb3761bf19a30249ac851d840cacc776fc5441 /tests
parent338f67e5e2c1ea42253a6b54643c50ddb6fc660a (diff)
Fixes more issues on PHP 8.1 (#18514)
* fixes deprecation warning in ui-test.php /srv/matomo/config/environment/ui-test.php(53): Deprecated - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated * fixes deprecation warning caused by SettingsPiwik.php /srv/matomo/plugins/UsersManager/Controller.php(669): Deprecated - md5(): Passing null to parameter #1 ($string) of type string is deprecated * Fixes deprecation warning in ComparisonRowGenerator.php /srv/matomo/plugins/API/Filter/DataComparisonFilter/ComparisonRowGenerator.php(129): Deprecated - Automatic conversion of false to array is deprecated * Fixes type error in Sparklines.php Uncaught exception: TypeError: array_diff(): Argument #1 ($array) must be of type array, string given in /srv/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php:306 * Fixes some warnings in DisablePluginArchive fixture /srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(59): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useThirdPartyCookies /srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(74): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch /srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(75): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch /srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(76): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch /srv/matomo/tests/PHPUnit/Fixtures/DisablePluginArchive.php(132): Warning - Undefined property: Piwik\Tests\Fixtures\DisablePluginArchive::$useSiteSearch * Fixes undefined array key warningin SitesManager.php /srv/matomo/plugins/SitesManager/SitesManager.php(376): Warning - Undefined array key unknown
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Fixtures/DisablePluginArchive.php34
1 files changed, 8 insertions, 26 deletions
diff --git a/tests/PHPUnit/Fixtures/DisablePluginArchive.php b/tests/PHPUnit/Fixtures/DisablePluginArchive.php
index ff7e720ca6..4c96561b62 100644
--- a/tests/PHPUnit/Fixtures/DisablePluginArchive.php
+++ b/tests/PHPUnit/Fixtures/DisablePluginArchive.php
@@ -56,10 +56,6 @@ class DisablePluginArchive extends Fixture
Cache::clearCacheGeneral();
Cache::regenerateCacheWebsiteAttributes(array($idSite));
- if ($this->useThirdPartyCookies) {
- $t->DEBUG_APPEND_URL = '&forceUseThirdPartyCookie=1';
- }
-
$t->disableCookieSupport();
$t->setUrlReferrer('http://referrer.com/page.htm?param=valuewith some spaces');
@@ -71,9 +67,9 @@ class DisablePluginArchive extends Fixture
'new name',
$url = array('http://site.com'),
$ecommerce = 0,
- $siteSearch = $this->useSiteSearch ? 1 : 0,
- $searchKeywordParameters = $this->useSiteSearch ? '' : null,
- $searchCategoryParameters = $this->useSiteSearch ? 'notparam' : null,
+ $siteSearch = 0,
+ $searchKeywordParameters = null,
+ $searchCategoryParameters = null,
$excludedIps = null,
$parameterToExclude . ',anotherParameter',
$timezone = null,
@@ -129,25 +125,11 @@ class DisablePluginArchive extends Fixture
$t->setBrowserLanguage('fr');
- if ($this->useSiteSearch) {
- // Site Search request
- $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.42)->getDatetime());
- $t->setUrl('http://example.org/index.htm?q=Banks Own The World');
- $t->setPerformanceTimings(17, 236, 385, 1025, 199, 266);
- self::checkResponse($t->doTrackPageView('Site Search request'));
-
- // Final page view (after 27 min)
- $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.45)->getDatetime());
- $t->setUrl('http://example.org/index.htm');
- $t->setPerformanceTimings(42, 96, 200, 955, 566, 200);
- self::checkResponse($t->doTrackPageView('Looking at homepage after site search...'));
- } else {
- // Final page view (after 27 min)
- $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.45)->getDatetime());
- $t->setUrl('http://example.org/index.htm#ignoredFragment#');
- $t->setPerformanceTimings(0, 222, 333, 1111, 666, 333);
- self::checkResponse($t->doTrackPageView('Looking at homepage (again)...'));
- }
+ // Final page view (after 27 min)
+ $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.45)->getDatetime());
+ $t->setUrl('http://example.org/index.htm#ignoredFragment#');
+ $t->setPerformanceTimings(0, 222, 333, 1111, 666, 333);
+ self::checkResponse($t->doTrackPageView('Looking at homepage (again)...'));
// -
// End of first visit: 24min