Jump to content
Jump to navigation

Jump to heading Test

  • first all PHPUnit, kernel and functional tests are executed (against an empty DB, these tests need to make sure to install all dependencies, but that's by design)
  • then drupal gets installed and all existing-site-tests are executed. They work against the default content with an actual frontend and all configuration from code (quasi some kind of e2e-tests)

All this is happening in an isolated docker-compose setup which gets destroyed after test-exection.

To run the backend tests locally you have multiple choices:

  1. either run them from PHPStorm against your local installation

  2. or run it via,

    ddev ssh
    vendor/bin/phpunit

    use vendor/bin/phpunit --testdox if you want a nice verbose output.

  3. if you want to run them isolated via docker-compose (w/o interfering with your local installation)

    phab -cci script build:frontend atag=<branch-name-wo-slash>
    phab -cci script push:frontend atag=<branch-name-wo-slash>
    phab -cci script test:backend atag=<branch-name-wo-slash>

Important: Tests need to be in the correct folder to be picked up. Please see phpunit.xml.dist