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%