This project template provides a starter kit for managing your LocalGov Drupal Microsites dependencies with Composer.
First you need to install Composer.
After that you can create the project:
composer create-project --stability dev localgovdrupal/localgov_microsites_project MY_PROJECT --no-install
If using Lando, you can then boot up Lando and run the site install
cd MY_PROJECT
lando start
lando composer install
lando drush si localgov_microsites
If you're not using lando, you'll still need to run the composer install.
cd MY_PROJECT
composer install
drush si localgov_microsites
The included phpunit.xml.dist file contains configuration for automatically running the LocalGov Drupal test suite.
The default .lando.dist.xml includes environment variables for:
BROWSERTEST_OUTPUT_DIRECTORY: '/app/web/sites/simpletest/browser_output'
BROWSERTEST_OUTPUT_BASE_URL: 'https://localgov-micro.lndo.site'
To allow html output, manually create a directory for browser output.
mkdir web/sites/simpletest/browser_output
To run all LocalGov Drupal tests from Lando:
lando ssh
phpunit
To run all the tests for a specific module:
lando ssh
phpunit web/modules/contrib/localgov_my_module
Tests can be filtered using the --filter
option. To only run a specific test:
lando ssh
phpunit --filter=myTestName