From e020e1455faaf0a5fcce9c4dca112a907546f603 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Mon, 8 Jul 2024 11:09:17 +1200 Subject: [PATCH] One more minor correction --- tests/System/Commands/MigrateTest.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/System/Commands/MigrateTest.php b/tests/System/Commands/MigrateTest.php index 9b0a4f6..e337102 100644 --- a/tests/System/Commands/MigrateTest.php +++ b/tests/System/Commands/MigrateTest.php @@ -148,7 +148,7 @@ public function testApi($api, $params) FakeAccess::clearAccess(true); $this->disableArchiving(); - if ('Live.getLastVisitsDetails' === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) { + if (['Live.getLastVisitsDetails'] === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) { $params['testSuffix'] = '5-2a'; } $this->runApiTests($api, $params); @@ -166,7 +166,7 @@ public function testApi_migrated($api, $params) FakeAccess::clearAccess($superUser = true); - if ('Live.getLastVisitsDetails' === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) { + if (['Live.getLastVisitsDetails'] === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) { $params['testSuffix'] = '5-2a'; } try { @@ -237,13 +237,9 @@ public function getApiForTesting() 'SitesManager.getSiteFromId', 'Goals.getGoals', 'CustomDimensions.getConfiguredCustomDimensions', + 'Live.getLastVisitsDetails', ]; - // This one doesn't play nice with PHP 8 and earlier versions of Matomo. So, only include it for newer versions - if (version_compare(PHP_VERSION, '8.0.0', '<')) { - $apis[] = 'Live.getLastVisitsDetails'; - } - $apiToTest = []; foreach ($apis as $api) { $testSuffix = '';