localgovdrupal/localgov_microsites_project

Project template for the LocalGov Drupal Microsites distribution.

4.0.0-alpha1 2024-02-29 15:21 UTC

README

This project template provides a starter kit for managing your LocalGov Drupal Microsites dependencies with Composer.

Usage

First you need to install Composer.

After that you can create the project:

composer create-project --stability alpha localgovdrupal/localgov_microsites_project MY_PROJECT  --no-install

Using Lando

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

Not using Lando

If you're not using lando, you'll still need to run the composer install.

cd MY_PROJECT
composer install
drush si localgov_microsites

Running PHPUnit tests in Lando

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

Maintainers

This project is currently maintained by: