Skip to content

Commit

Permalink
One more minor correction
Browse files Browse the repository at this point in the history
  • Loading branch information
snake14 committed Jul 7, 2024
1 parent ebc7693 commit e020e14
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/System/Commands/MigrateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down Expand Up @@ -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 = '';
Expand Down

0 comments on commit e020e14

Please sign in to comment.