Skip to content

Commit

Permalink
Merge pull request #52 from innocraft/PG-3129-php-8.3-upgrade-4x
Browse files Browse the repository at this point in the history
Updated tests to run on php 8.3 from 8.2, #PG-3129
  • Loading branch information
snake14 authored Nov 14, 2023
2 parents a846eef + 213ee64 commit bbd7e52
Show file tree
Hide file tree
Showing 13 changed files with 8,190 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/matomo-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Action for running tests
# This file has been automatically created.
# To recreate it you can run this command
# ./console generate:test-action --plugin="CustomTranslations" --php-versions="7.2,8.2" --protect-artifacts --schedule-cron="45 3 * * 6"
# ./console generate:test-action --plugin="CustomTranslations" --php-versions="7.2,8.3" --protect-artifacts --schedule-cron="45 3 * * 6"

name: Plugin CustomTranslations Tests

Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.2', '8.2' ]
php: [ '7.2', '8.3' ]
target: ['minimum_required_matomo', 'maximum_supported_matomo']
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions tests/System/APITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function test_getTranslatableTypes($api)
}

$apiOutputIsMissingMetricTypes = version_compare(Version::VERSION, '4.13.4-b1', '<');
$testSuffix = 'API.getReportMetadata' == $api && $apiOutputIsMissingMetricTypes ? '_Old' : '';
$testSuffix = in_array($api, ['API.getReportMetadata', 'API.getWidgetMetadata', 'API.getReportPagesMetadata']) && $apiOutputIsMissingMetricTypes ? '_Old' : '';

$this->runAnyApiTest($api, '', $params, array('testSuffix' => $testSuffix, 'xmlFieldsToRemove' => array('imageGraphUrl', 'imageGraphEvolutionUrl')));
}
Expand Down Expand Up @@ -119,7 +119,7 @@ public function test_getTranslatableTypes_withCustomReports($api)
'period' => 'day',
);

$testSuffix = 'withCustomReports' . ('API.getReportMetadata' == $api && $apiOutputIsMissingMetricTypes ? '_Old' : '');
$testSuffix = 'withCustomReports' . (in_array($api, ['API.getReportMetadata', 'API.getWidgetMetadata', 'API.getReportPagesMetadata']) && $apiOutputIsMissingMetricTypes ? '_Old' : '');
$this->runAnyApiTest($api, '', $params, array('testSuffix' => $testSuffix, 'xmlFieldsToRemove' => array('imageGraphUrl', 'imageGraphEvolutionUrl')));
}

Expand Down
367 changes: 364 additions & 3 deletions tests/System/expected/test___API.getReportPagesMetadata_.xml

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions tests/System/expected/test___API.getWidgetMetadata_.xml

Large diffs are not rendered by default.

Loading

0 comments on commit bbd7e52

Please sign in to comment.