Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Protected Endpoints tests #14

Merged
merged 5 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
}