diff --git a/tests/System/TasksTest.php b/tests/System/TasksTest.php index 1e15bac..4adcf46 100644 --- a/tests/System/TasksTest.php +++ b/tests/System/TasksTest.php @@ -13,6 +13,7 @@ use Piwik\Piwik; use Piwik\Plugins\AnonymousPiwikUsageMeasurement\tests\Fixtures\SendSystemReportTaskFixture; use Piwik\Tests\Framework\TestCase\SystemTestCase; +use Piwik\Version; /** * @group AnonymousPiwikUsageMeasurement @@ -79,6 +80,12 @@ public function getApiForTesting() 'CustomVariables', ]; + $xmlFieldsToRemove = []; + + if (version_compare(Version::VERSION, '5.5.0-b1', '<')) { + $xmlFieldsToRemove = ['Referrers_visitorsFromAIAssistants', 'Referrers_distinctAIAssistants', 'Referrers_visitorsFromAIAssistants_percent']; + } + $apiToTest = []; foreach ($apis as $api) { $apiToTest[] = [ @@ -94,6 +101,7 @@ public function getApiForTesting() // when calling CustomVariables.getUsagesOfSlots, new archives are created until 'today', // which increments idsubdatatable, but we need to have deterministic idsubdatatable 'apiNotToCall' => ['CustomVariables.getUsagesOfSlots'], + 'xmlFieldsToRemove' => $xmlFieldsToRemove, ] ]; } diff --git a/tests/System/expected/test___API.get_year.xml b/tests/System/expected/test___API.get_year.xml index 8eab3ab..6fec697 100644 --- a/tests/System/expected/test___API.get_year.xml +++ b/tests/System/expected/test___API.get_year.xml @@ -17,11 +17,13 @@ 0 0 0 + 0 1 0 0 0 0 + 0 0 0 0 @@ -69,6 +71,7 @@ 0 100% 0% + 0% 0% 0% 0%