From ebd7abf1ac8e17c0b5dadee74b1a3a4e11283f2c Mon Sep 17 00:00:00 2001 From: Freek van Rijt Date: Fri, 6 Dec 2024 11:03:19 +0100 Subject: [PATCH] test: fix errors running phpunit with coverage fix errors running phpunit with coverage enabled and run tests on the lowest supported PHP version fixes: INT-743 --- .github/workflows/--test.yml | 2 +- composer.json | 4 ++-- docker-compose.yml | 2 +- .../Model/Consignment/DHLParcelConnectConsignmentTest.php | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/--test.yml b/.github/workflows/--test.yml index 54bbf6d0..5156304a 100644 --- a/.github/workflows/--test.yml +++ b/.github/workflows/--test.yml @@ -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' diff --git a/composer.json b/composer.json index 55cdb181..a3d53ac2 100755 --- a/composer.json +++ b/composer.json @@ -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" @@ -50,4 +50,4 @@ "MyParcelNL\\Sdk\\Test\\": "test" } } -} \ No newline at end of file +} diff --git a/docker-compose.yml b/docker-compose.yml index 4449b9ed..99e64a0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/test/Model/Consignment/DHLParcelConnectConsignmentTest.php b/test/Model/Consignment/DHLParcelConnectConsignmentTest.php index 7b3dc018..b7471ca1 100644 --- a/test/Model/Consignment/DHLParcelConnectConsignmentTest.php +++ b/test/Model/Consignment/DHLParcelConnectConsignmentTest.php @@ -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 => '', ];