wunderio/lando-drupal

Allow overriding scripts

Closed this issue · 1 comments

Currently, we have this tooling command to run PHPUnit.

.lando.base.yml:

tooling:
  phpunit:
    description: "Runs PHPUnit commands"
    user: www-data
    cmd:
      - appserver: "php /app/vendor/bin/phpunit -c /app/phpunit.xml --testdox"

In one of our custom project we have this:
lando.yml:

  phpunit:
    service: appserver
    description: Run Drupal PHPUnit tests. Run 'lando phpunit --help' for more information.
    cmd:
      - "/app/.lando/custom/phpunit.sh"

and

phpunit.sh:

install -d /app/public/simpletest/browser_output
cd /app/
XDEBUG_MODE=coverage php \
  /app/vendor/bin/phpunit \
  --testdox \
  --configuration /app/phpunit.lando.xml \
  "$@"

We need to make the folder and we're also planning to remove the --testdox parameter.

I guess one alternative would be try to comply with the rules defined by this package but then again I think it would nice feature ot allow overriding these.

Initial version is done.