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

PHPUnit 10 support #34

Merged
merged 5 commits into from
May 7, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ BASE_URI=http://127.0.0.1:8080
UID=1000
GID=1000

# PHPUnit
SIMPLETEST_BASE_URL=http://127.0.0.1:8080
SIMPLETEST_DB=mysql://local:[email protected]/local
BROWSERTEST_OUTPUT_DIRECTORY=/tmp
BROWSERTEST_OUTPUT_BASE_URL=${BASE_URI}
BROWSERTEST_OUTPUT_VERBOSE=true

# CHROME DRIVER
# SELENIUM_IMAGE=drupalci/chromedriver:production
# MINK_DRIVER_ARGS_WEBDRIVER='["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--headless", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://127.0.0.1:9515"]'
SELENIUM_IMAGE=drupalci/chromedriver:production
MINK_DRIVER_ARGS_WEBDRIVER='["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--headless", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://127.0.0.1:9515"]'

## SELENIUM CHROME
# SELENIUM_IMAGE=selenium/standalone-chrome:111.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Alternatively you can run phpunit on the command line like so:

```
docker-compose exec php-cli bash
phpunit app/core/tests/Drupal/Tests/Core/DrupalKernel/
phpunit -c app/core/phpunit.xml.dist app/core/tests/Drupal/Tests/Core/DrupalKernel/
```

## Debugging
Expand Down
2 changes: 1 addition & 1 deletion assets/scaffold/files/php.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</component>
<component name="PhpUnit">
<phpunit_settings>
<phpunit_by_interpreter interpreter_id="f58849c8-e0cd-4acc-973b-98da73eaafb1" configuration_file_path="/data/phpunit.xml" custom_loader_path="/data/vendor/autoload.php" phpunit_phar_path="" use_configuration_file="true" />
<phpunit_by_interpreter interpreter_id="f58849c8-e0cd-4acc-973b-98da73eaafb1" configuration_file_path="/data/app/core/phpunit.xml.dist" custom_loader_path="/data/vendor/autoload.php" phpunit_phar_path="" use_configuration_file="true" />
</phpunit_settings>
</component>
</project>
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ services:
network_mode: service:nginx
environment:
- DRUSH_OPTIONS_URI=${BASE_URI:-http://127.0.0.1:8080}
- PHP_IDE_CONFIG=serverName=localhost
- SIMPLETEST_BASE_URL=${SIMPLETEST_BASE_URL:-http://127.0.0.1:8080}
- SIMPLETEST_DB=${SIMPLETEST_DB:-mysql://local:[email protected]/local}
- BROWSERTEST_OUTPUT_DIRECTORY=${BROWSERTEST_OUTPUT_DIRECTORY:-/tmp}
- BROWSERTEST_OUTPUT_BASE_URL=${BASE_URI:-http://127.0.0.1:8080}
- BROWSERTEST_OUTPUT_VERBOSE=${BROWSERTEST_OUTPUT_VERBOSE:-true}
- MINK_DRIVER_ARGS_WEBDRIVER
- PHP_IDE_CONFIG=serverName=localhost
volumes:
- ./:/data
- ./.docker/php/custom.ini:/etc/php/conf.d/99-custom.ini
Expand Down
62 changes: 0 additions & 62 deletions phpunit.xml

This file was deleted.