diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-08-17 10:58:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 10:58:59 +0300 |
commit | 0829d6e6ac487bf47e4197123d6683b271db8266 (patch) | |
tree | 77f8edd0c326b29c50d9fefd174cd45d5ebcbc92 /plugins/Referrers | |
parent | 8c7fa7d8d414b5201c36661fb4828d14e4c33c53 (diff) |
Run AllTests on PHP8 (#16897)
* Run AllTests on PHP8
* use newer phpunit for tests on PHP8
* fix notices/errors
* handle trace of phpunit 9
* ensure to compare same types for range check
* adjust expected result for php8
* try handling hasDependencies does not exist in PHPUnit 9
* fix: ArgumentCountError: mysqli_stmt::bind_param() does not accept unknown named parameters
* Fix usercountry tests
* remove incorrect date check
* fix expected exception message
* fix referrers api test for php8
* add test hint
* try to fix session related tests
* debug test failure
* try to fix mail tests
* fix filterUser method
* exlucde phpunit from build size calculation
* fix scheduled reports test
* update release checklist test
* unset climode
* improves some tests
Diffstat (limited to 'plugins/Referrers')
-rw-r--r-- | plugins/Referrers/tests/System/ApiTest.php | 2 | ||||
-rw-r--r-- | plugins/Referrers/tests/System/expected/test_phpSerialized8__Referrers.getReferrerType_year.original | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/Referrers/tests/System/ApiTest.php b/plugins/Referrers/tests/System/ApiTest.php index 6dad34603c..7d6ba4c4e5 100644 --- a/plugins/Referrers/tests/System/ApiTest.php +++ b/plugins/Referrers/tests/System/ApiTest.php @@ -62,7 +62,7 @@ class ApiTest extends SystemTestCase 'idSite' => 1, 'date' => '2010-01-01', 'periods' => 'year', - 'testSuffix' => 'phpSerialized' . (version_compare(PHP_VERSION, '7.4', '>=') ? '74' : ''), + 'testSuffix' => 'phpSerialized' . (version_compare(PHP_VERSION, '8', '>=') ? 8 : (version_compare(PHP_VERSION, '7.4', '>=') ? '74' : '')), 'format' => 'original', ], ]; diff --git a/plugins/Referrers/tests/System/expected/test_phpSerialized8__Referrers.getReferrerType_year.original b/plugins/Referrers/tests/System/expected/test_phpSerialized8__Referrers.getReferrerType_year.original new file mode 100644 index 0000000000..1a7eac1d06 --- /dev/null +++ b/plugins/Referrers/tests/System/expected/test_phpSerialized8__Referrers.getReferrerType_year.original @@ -0,0 +1 @@ +O:15:"Piwik\DataTable":4:{s:7:"*rows";a:2:{i:0;O:19:"Piwik\DataTable\Row":4:{i:0;i:0;i:1;a:9:{s:5:"label";s:14:"Search Engines";s:9:"nb_visits";i:31;s:10:"nb_actions";i:31;s:11:"max_actions";d:1;s:16:"sum_visit_length";i:0;s:12:"bounce_count";i:31;s:19:"nb_visits_converted";i:0;s:26:"sum_daily_nb_uniq_visitors";i:31;s:18:"sum_daily_nb_users";i:0;}i:2;a:5:{s:15:"maxVisitsSummed";i:0;s:29:"Piwik\DataTable\Rowmetadata";a:2:{s:7:"segment";s:20:"referrerType==search";s:13:"referrer_type";i:2;}s:37:"Piwik\DataTable\RowisSubtableLoaded";b:0;s:10:"subtableId";N;s:33:"Piwik\DataTable\RowisSummaryRow";b:0;}i:3;N;}i:1;O:19:"Piwik\DataTable\Row":4:{i:0;i:0;i:1;a:12:{s:5:"label";s:8:"Websites";s:9:"nb_visits";i:31;s:10:"nb_actions";i:31;s:11:"max_actions";d:1;s:16:"sum_visit_length";i:11315;s:12:"bounce_count";i:31;s:19:"nb_visits_converted";i:31;s:5:"goals";a:2:{s:8:"idgoal=1";a:3:{s:14:"nb_conversions";i:31;s:19:"nb_visits_converted";i:31;s:7:"revenue";d:0;}s:8:"idgoal=2";a:3:{s:14:"nb_conversions";i:62;s:19:"nb_visits_converted";i:31;s:7:"revenue";d:0;}}s:14:"nb_conversions";i:93;s:7:"revenue";d:0;s:26:"sum_daily_nb_uniq_visitors";i:31;s:18:"sum_daily_nb_users";i:0;}i:2;a:5:{s:15:"maxVisitsSummed";i:0;s:29:"Piwik\DataTable\Rowmetadata";a:2:{s:7:"segment";s:21:"referrerType==website";s:13:"referrer_type";i:3;}s:37:"Piwik\DataTable\RowisSubtableLoaded";b:0;s:10:"subtableId";N;s:33:"Piwik\DataTable\RowisSummaryRow";b:0;}i:3;N;}}s:13:"*summaryRow";N;s:11:"*metadata";a:7:{s:11:"ts_archived";s:19:"today-date-removed-in-tests";s:4:"site";O:10:"Piwik\Site":2:{s:5:"*id";i:1;s:16:"Piwik\Sitesite";a:20:{s:6:"idsite";i:1;s:4:"name";s:10:"Piwik test";s:8:"main_url";s:16:"http://piwik.net";s:10:"ts_created";s:19:"2010-01-31 11:22:33";s:9:"ecommerce";i:0;s:10:"sitesearch";i:1;s:29:"sitesearch_keyword_parameters";s:0:"";s:30:"sitesearch_category_parameters";s:0:"";s:8:"timezone";s:3:"UTC";s:8:"currency";s:3:"USD";s:20:"exclude_unknown_urls";i:0;s:12:"excluded_ips";s:0:"";s:19:"excluded_parameters";s:0:"";s:20:"excluded_user_agents";s:0:"";s:5:"group";s:0:"";s:4:"type";s:7:"website";s:17:"keep_url_fragment";i:0;s:13:"creator_login";s:14:"superUserLogin";s:13:"timezone_name";s:3:"UTC";s:13:"currency_name";s:9:"US Dollar";}}s:6:"period";O:17:"Piwik\Period\Year":1:{s:7:"*date";O:10:"Piwik\Date":2:{s:12:"*timestamp";i:1262304000;s:11:"*timezone";s:3:"UTC";}}s:7:"segment";s:0:"";s:13:"segmentPretty";s:10:"All visits";s:6:"totals";a:15:{s:9:"nb_visits";i:62;s:10:"nb_actions";i:62;s:11:"max_actions";d:1;s:16:"sum_visit_length";i:11315;s:12:"bounce_count";i:62;s:19:"nb_visits_converted";i:31;s:26:"sum_daily_nb_uniq_visitors";i:62;s:18:"sum_daily_nb_users";i:0;s:5:"goals";a:2:{s:8:"idgoal=1";a:3:{s:14:"nb_conversions";i:31;s:19:"nb_visits_converted";i:31;s:7:"revenue";d:0;}s:8:"idgoal=2";a:3:{s:14:"nb_conversions";i:62;s:19:"nb_visits_converted";i:31;s:7:"revenue";d:0;}}s:14:"nb_conversions";i:93;s:7:"revenue";d:0;s:15:"conversion_rate";s:3:"50%";s:20:"nb_actions_per_visit";d:1;s:16:"avg_time_on_site";d:183;s:11:"bounce_rate";s:4:"100%";}s:17:"totalsUnformatted";a:15:{s:9:"nb_visits";i:62;s:10:"nb_actions";i:62;s:11:"max_actions";d:1;s:16:"sum_visit_length";i:11315;s:12:"bounce_count";i:62;s:19:"nb_visits_converted";i:31;s:26:"sum_daily_nb_uniq_visitors";i:62;s:18:"sum_daily_nb_users";i:0;s:5:"goals";a:2:{s:8:"idgoal=1";a:3:{s:14:"nb_conversions";i:31;s:19:"nb_visits_converted";i:31;s:7:"revenue";d:0;}s:8:"idgoal=2";a:3:{s:14:"nb_conversions";i:62;s:19:"nb_visits_converted";i:31;s:7:"revenue";d:0;}}s:14:"nb_conversions";i:93;s:7:"revenue";d:0;s:15:"conversion_rate";d:0.5;s:20:"nb_actions_per_visit";d:1;s:16:"avg_time_on_site";d:183;s:11:"bounce_rate";d:1;}}s:12:"*totalsRow";N;}
\ No newline at end of file |