Skip to content

Commit

Permalink
#122: Move SIMPLETEST* envvars to phpunit.xml, add force="true" to SI…
Browse files Browse the repository at this point in the history
…MPLETEST_BASE_URL.
  • Loading branch information
tormi committed Mar 13, 2021
1 parent 0e2698b commit fd2e63d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ services:
XDEBUG_MODE:
# Support debugging Drush with XDEBUG 3.
PHP_IDE_CONFIG: "serverName=appserver"
# SimpleTest settings.
SIMPLETEST_BASE_URL: "http://appserver_nginx"
SIMPLETEST_DB: "sqlite://localhost/tmp/db.sqlite"
# PHPUnit settings. @see: .lando/phpunit.sh
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://chrome:9515"]'
chrome:
type: compose
Expand Down
2 changes: 2 additions & 0 deletions .lando/phpunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if [ ! -f "$PHPUNIT_CONFIG" ]; then
sed -i 's|\.\/tests\/|./web/core/tests/|g' phpunit.xml
sed -i 's|directory>\.\/|directory>./web/core/|g' phpunit.xml
sed -i 's|directory>\.\.\/|directory>./web/core/|g' phpunit.xml
sed -i 's|<env name="SIMPLETEST_BASE_URL" value=""\/>|<env name="SIMPLETEST_BASE_URL" value="http://appserver_nginx" force="true"/>|g' phpunit.xml
sed -i 's|<env name="SIMPLETEST_DB" value=""\/>|<env name="SIMPLETEST_DB" value="sqlite://localhost/tmp/db.sqlite"/>|g' phpunit.xml
vendor/bin/phpunit --migrate-configuration
rm phpunit.xml.bak
fi

0 comments on commit fd2e63d

Please sign in to comment.