From e6390c5ae94ccd8ad832555da38f33e9cfcf8d61 Mon Sep 17 00:00:00 2001 From: Marc Neudert Date: Thu, 23 Oct 2025 10:34:24 +0200 Subject: [PATCH] Updates expected test files after core changes --- tests/System/TasksTest.php | 22 +++++++++++++++++++ tests/System/expected/test___API.get_year.xml | 12 ++++++++++ 2 files changed, 34 insertions(+) diff --git a/tests/System/TasksTest.php b/tests/System/TasksTest.php index 4adcf46..0883a1f 100644 --- a/tests/System/TasksTest.php +++ b/tests/System/TasksTest.php @@ -86,6 +86,28 @@ public function getApiForTesting() $xmlFieldsToRemove = ['Referrers_visitorsFromAIAssistants', 'Referrers_distinctAIAssistants', 'Referrers_visitorsFromAIAssistants_percent']; } + if (version_compare(Version::VERSION, '5.6.0-alpha', '<')) { + // In Matomo 5.6 AI agent information had been added + $xmlFieldsToRemove = array_merge($xmlFieldsToRemove, [ + 'nb_visits_ai_agent', + 'nb_actions_ai_agent', + 'nb_uniq_visitors_ai_agent', + 'nb_users_ai_agent', + 'max_actions_ai_agent', + 'bounce_rate_ai_agent', + 'nb_actions_per_visit_ai_agent', + 'avg_time_on_site_ai_agent', + 'nb_visits_human', + 'nb_actions_human', + 'nb_uniq_visitors_human', + 'nb_users_human', + 'max_actions_human', + 'bounce_rate_human', + 'nb_actions_per_visit_human', + 'avg_time_on_site_human', + ]); + } + $apiToTest = []; foreach ($apis as $api) { $apiToTest[] = [ diff --git a/tests/System/expected/test___API.get_year.xml b/tests/System/expected/test___API.get_year.xml index 6fec697..3cf4e31 100644 --- a/tests/System/expected/test___API.get_year.xml +++ b/tests/System/expected/test___API.get_year.xml @@ -69,6 +69,18 @@ 0 0 0 + 0 + 0 + 0 + 0% + 0 + 0 + 1 + 39 + 39 + 0% + 39 + 1 100% 0% 0%