You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, I have custom tooling for phpunit that allows me to choose a configuration file to execute phpunit with but since the upgrade to 3.20.8 it is no longer working.
My tooling:
phpunit:
service: appservercmd: /app/bin/phpunit.shlevel: appoptions:
config:
passthrough: truealias:
- cinteractive:
type: listchoices:
- foobar
- blablamessage: 'Select site to test'
Example output on 3.18.0:
me@my-computer:~/Sites/drupal$ lando phpunit -c foobar /app/docroot/modules/custom/product_ingestion/tests/src/Unit/DealDateTest.php
__ __ __ __ ___ _ __ __ __ ______
/ / / /__ ___/ /__ _/ /____ / _ |_ _____ _(_) /__ _/ / / /__ / / / /
/ /_/ / _ \/ _ / _ `/ __/ -_) / __ ||/ / _ `/ / / _ `/ _ \/ / -_)_/_/_/ \____/ .__/\_,_/\_,_/\__/\__/ /_/ |_|___/\_,_/_/_/\_,_/_.__/_/\__(_|_|_) /_/ Updating helps us provide the best support and saves us tons of timeUse the link below to get the latest and greatesthttps://github.com/lando/lando/releases/tag/v3.20.8Lando is FREE and OPEN SOURCE software that relies on contributions from developers like you!If you like Lando thenhelp us spend more time making, updating and supporting it by contributing at the link belowhttps://github.com/sponsors/landoIf you would like to customize the behavior of this message then check out:https://docs.lando.dev/config/releases.html/app/app/vendor/bin/phpunit -c /app/config/lando/phpunit.lando.foobar.xml /app/docroot/modules/custom/product_ingestion/tests/src/Unit/DealDateTest.phpPHPUnit 9.6.15 by Sebastian Bergmann and contributors.Warning: Your XML configuration validates against a deprecated schema.Suggestion: Migrate your XML configuration using "--migrate-configuration"!Testing Drupal\Tests\product_ingestion\Unit\DealDateTest. 1 / 1 (100%)Time: 00:00.045, Memory: 10.00 MBOK (1 test, 2 assertions)
Example output on 3.20.8
me@my-computer:~/Sites/drupal$ lando phpunit -c foobar /app/docroot/modules/custom/product_ingestion/tests/src/Unit/DealDateTest.php
/opt/drupal
/app/vendor/bin/phpunit -c /app/config/lando/phpunit.lando.foobar.xml /app/docroot/modules/custom/product_ingestion/tests/src/Unit/DealDateTest.php
Warning: scandir(/sites): Failed to open directory: No such file or directory in /app/vendor/weitzman/drupal-test-traits/src/bootstrap.php on line 83
Warning: scandir(): (errno 0): Success in /app/vendor/weitzman/drupal-test-traits/src/bootstrap.php on line 83
Warning: foreach() argument must be of type array|object, bool given in /app/vendor/weitzman/drupal-test-traits/src/bootstrap.php on line 83
Warning: require_once(/core/tests/bootstrap.php): Failed to open stream: No such file or directory in /app/vendor/weitzman/drupal-test-traits/src/bootstrap.php on line 19
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.
Error in bootstrap script: Error:
Failed opening required '/core/tests/bootstrap.php' (include_path='/app/vendor/pear/archive_tar:/app/vendor/pear/console_getopt:/app/vendor/pear/pear-core-minimal/src:/app/vendor/pear/pear_exception:.:/usr/local/lib/php')
#0 /app/vendor/phpunit/phpunit/src/Util/FileLoader.php(66): include_once()#1 /app/vendor/phpunit/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load('/app/vendor/wei...')#2 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(565): PHPUnit\Util\FileLoader::checkAndLoad('/app/config/lan...')#3 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(345): PHPUnit\TextUI\Command->handleBootstrap('/app/config/lan...')#4 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(112): PHPUnit\TextUI\Command->handleArguments(Array)#5 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run(Array, true)#6 /app/vendor/phpunit/phpunit/phpunit(107): PHPUnit\TextUI\Command::main()#7 /app/vendor/bin/phpunit(122): include('/app/vendor/php...')#8 {main}
I'm echoing the current working directory in my phpunit script and as you can see on 3.18.0 it is outputting /app but on 3.20.8 it is outputting /opt/drupal
After googling around and randomly trying things I discovered that removing the level:app line from the tooling makes it work. It even still works interactively and with relative paths despite the documentation saying: "Note that if you use interactive options, you need to set level: app": https://docs.lando.dev/core/v3/tooling.html. I never actually understood why I needed that line but it seems to work fine without it... maybe the maintainers know more but could just be a simple documentation fix if it's no longer needed?
Details:
OS: Ubuntu
Using custom image based on official Drupal image
Upgraded from 3.18.0 to 3.20.8
The text was updated successfully, but these errors were encountered:
As the title says, I have custom tooling for phpunit that allows me to choose a configuration file to execute phpunit with but since the upgrade to 3.20.8 it is no longer working.
My tooling:
Example output on 3.18.0:
Example output on 3.20.8
I'm echoing the current working directory in my phpunit script and as you can see on 3.18.0 it is outputting
/app
but on 3.20.8 it is outputting/opt/drupal
After googling around and randomly trying things I discovered that removing the
level:app
line from the tooling makes it work. It even still works interactively and with relative paths despite the documentation saying: "Note that if you use interactive options, you need to set level: app": https://docs.lando.dev/core/v3/tooling.html. I never actually understood why I needed that line but it seems to work fine without it... maybe the maintainers know more but could just be a simple documentation fix if it's no longer needed?Details:
The text was updated successfully, but these errors were encountered: