dof-dss/nidirect-d8-test-install-profile

Unit test install profile for NI Direct

Installs: 5 734

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 7

Forks: 1

Type:drupal-custom-theme

1.0.1 2021-07-31 08:51 UTC

README

CircleCI

NIDirect Drupal 8 Test Install Profile

Drupal source code for the NIDirect website: https://www.nidirect.gov.uk.

Getting started

This repository should be cloned as follows inside the /web/profiles directory of a working Drupal 8 NIDirect site:

git clone git@svegit01.thestables.net:dss/nidirect-d8-test-install-profile.git custom

(after doing this, you should have a 'web/profiles/custom/test_profile' directory in your project)

Updating the install profile

Simply export your current config to the install profile directory like this:

lando drush config-export --destination=profiles/custom/test_profile/config/sync

After doing this, edit profiles/custom/test_profile/config/sync/core.extension.yml and make sure that the install profile is set to 'test_profile' rather than 'standard'. Note that this may involve making two changes towards the bottom of the file, as shown in the following sample from the end of the core.extension.yml file:

  test_profile: 1000
  theme:
    stable: 0
    classy: 0
    bartik: 0
    seven: 0
    stark: 0 
  profile: test_profile
  _core:
    default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc

Running unit tests

First, ensure that your SIMPLETEST_BASE_URL is set to the local site URL in the lando config/phpunit.lando.xml file (this should be set automatically by the Lando build scripts, but is worth checking if you are having problems)

From inside lando (ssh’d in) in the directory /app/drupal8/web/core run this:

../../vendor/bin/phpunit ../modules/custom/nidirect_common/tests/src/Functional/DrivingInstructorTest.php