Skip to content

Commit

Permalink
Merge pull request PrestaShop#14 from M0rgan01/fix/protected-tests
Browse files Browse the repository at this point in the history
Update Protected Endpoints tests
  • Loading branch information
jolelievre authored Feb 23, 2024
2 parents c7922b9 + 44a9649 commit 482a224
Show file tree
Hide file tree
Showing 18 changed files with 2,656 additions and 276 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
USER_ID=$(id -u) GROUP_ID=$(id -g) docker exec prestashop_prestashop-git_1 composer create-test-db
- name: Run integration tests
run : |
USER_ID=$(id -u) GROUP_ID=$(id -g) docker exec prestashop_prestashop-git_1 vendor/bin/phpunit -c modules/ps_apiresources/tests/Integration/phpunit.xml
USER_ID=$(id -u) GROUP_ID=$(id -g) docker exec prestashop_prestashop-git_1 vendor/bin/phpunit -c modules/ps_apiresources/tests/Integration/phpunit-ci.xml
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/vendor
.php-cs-fixer.cache
.phpunit.result.cache
tests/local-parameters/parameters.php
tests/local-parameters/parameters.yml
13 changes: 12 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"php": ">=8.1"
},
"require-dev": {
"prestashop/php-dev-tools": "^4.2"
"prestashop/php-dev-tools": "^4.2",
"czproject/git-php": "^4.2",
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand All @@ -35,5 +37,14 @@
"php": "8.1.0"
}
},
"scripts": {
"clear-test-cache": "PsApiResourcesTest\\EnvironmentBuilder::clearCache",
"create-test-db": [
"@composer clear-test-cache",
"@composer setup-local-tests -- --build-db"
],
"run-module-tests": "@php -d date.timezone=UTC ./vendor/bin/phpunit -c tests/Integration/phpunit-local.xml",
"setup-local-tests": "PsApiResourcesTest\\EnvironmentBuilder::setupLocalTests"
},
"type": "prestashop-module"
}
Loading

0 comments on commit 482a224

Please sign in to comment.