Skip to content

Commit

Permalink
test: fix errors running phpunit with coverage
Browse files Browse the repository at this point in the history
fix errors running phpunit with coverage enabled and run tests on the lowest supported PHP version

fixes: INT-743
  • Loading branch information
FreekVR committed Dec 6, 2024
1 parent cdf6f3c commit ebd7abf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/--test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: github.actor != 'dependabot[bot]' && steps.cache-coverage.outputs.cache-hit != 'true'
id: docker
with:
image: ghcr.io/myparcelnl/php-xd:7.2
image: ghcr.io/myparcelnl/php-xd:7.1

- name: 'Install composer dependencies'
if: github.actor != 'dependabot[bot]' && steps.cache-coverage.outputs.cache-hit != 'true'
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
],
"scripts": {
"test": "phpunit",
"test:coverage": "vendor/bin/phpunit --coverage-html coverage"
"test:coverage": ["@putenv XDEBUG_MODE=coverage","vendor/bin/phpunit --coverage-html coverage"]
},
"require": {
"php": ">=7.1.0"
Expand All @@ -50,4 +50,4 @@
"MyParcelNL\\Sdk\\Test\\": "test"
}
}
}
}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.9'

# volumes are not in common, because phpstorm doesn't understand it
x-common: &common
image: ghcr.io/myparcelnl/php-xd:7.2
image: ghcr.io/myparcelnl/php-xd:7.1
init: true
env_file:
- .env
Expand Down
8 changes: 4 additions & 4 deletions test/Model/Consignment/DHLParcelConnectConsignmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public function provideDHLParcelConnectConsignmentsData(): array
{
$pickupInformation = [
self::DELIVERY_TYPE => AbstractConsignment::DELIVERY_TYPE_PICKUP,
self::PICKUP_STREET => 'Boulevard National',
self::PICKUP_STREET => 'Rte des fusilles de la resis',
self::PICKUP_CITY => 'Nanterre',
self::PICKUP_NUMBER => '134',
self::PICKUP_NUMBER => '110',
self::PICKUP_POSTAL_CODE => '92000',
self::PICKUP_COUNTRY => 'FR',
self::PICKUP_LOCATION_NAME => 'LES 4 SAISONS',
self::PICKUP_LOCATION_CODE => '8057-H4100',
self::PICKUP_LOCATION_NAME => 'MARCHE D A COTE',
self::PICKUP_LOCATION_CODE => 'S2203',
self::RETAIL_NETWORK_ID => '',
];

Expand Down

0 comments on commit ebd7abf

Please sign in to comment.