diff --git a/tests/System/TrackSeveralCampaignsTest.php b/tests/System/TrackSeveralCampaignsTest.php
index 42ea338..5f057f4 100644
--- a/tests/System/TrackSeveralCampaignsTest.php
+++ b/tests/System/TrackSeveralCampaignsTest.php
@@ -88,6 +88,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[] = [
'API.get',
[
@@ -111,6 +133,28 @@ public function getApiForTesting()
$columnsToHide = array_merge($columnsToHide, ['referrerAIAssistantUrl', 'referrerAIAssistantIcon']);
}
+ if (version_compare(Version::VERSION, '5.6.0-alpha', '<')) {
+ // In Matomo 5.6 AI agent information had been added
+ $columnsToHide = array_merge($columnsToHide, [
+ '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[] = [
'Live.getLastVisitsDetails',
[
diff --git a/tests/System/expected/test_max_php___API.get_day.xml b/tests/System/expected/test_max_php___API.get_day.xml
index de7b665..d2f6579 100644
--- a/tests/System/expected/test_max_php___API.get_day.xml
+++ b/tests/System/expected/test_max_php___API.get_day.xml
@@ -81,6 +81,22 @@
0
0
18
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0%
+ 0
+ 0
+ 18
+ 18
+ 1
+ 0
+ 1
+ 100%
+ 1
+ 121
0%
0%
0%
diff --git a/tests/System/expected/test_min_php___API.get_day.xml b/tests/System/expected/test_min_php___API.get_day.xml
index c267988..0ae73e5 100644
--- a/tests/System/expected/test_min_php___API.get_day.xml
+++ b/tests/System/expected/test_min_php___API.get_day.xml
@@ -81,6 +81,22 @@
0
0
18
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0%
+ 0
+ 0
+ 18
+ 18
+ 1
+ 0
+ 1
+ 100%
+ 1
+ 121
0%
0%
0%