Add phpunit.xml.dist

Fixes #32
This commit is contained in:
Oliver Davies 2020-05-13 03:06:29 +01:00
parent 3150c948f0
commit a3e328a8d0
3 changed files with 30 additions and 1 deletions

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
!/bin/*
!/config/**
!/phpstan.neon
!/phpunit.xml.dist
!/scripts/**
!/web/modules/custom/**
!/web/sites/default/environments/settings.*.php

View file

@ -18,5 +18,4 @@ symfony php vendor/bin/phpcs -n \
vendor/bin/phpstan analyze
symfony php vendor/bin/phpunit \
-c web/core \
"$@"

29
phpunit.xml.dist Normal file
View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="web/core/tests/bootstrap.php"
colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true"
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter">
<php>
<ini name="error_reporting" value="32767"/>
<ini name="memory_limit" value="-1"/>
<env name="SIMPLETEST_BASE_URL" value="https://localhost:8000"/>
<env name="SIMPLETEST_DB" value="sqlite://localhost//tmp/.oliverdavies-uk.sqlite"/>
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
<env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/>
<env name="MINK_DRIVER_CLASS" value=''/>
<env name="MINK_DRIVER_ARGS_PHANTOMJS" value=''/>
</php>
<testsuites>
<testsuite name="functional">
<directory suffix="Test.php">./web/modules/custom/**/tests/**/Functional</directory>
</testsuite>
<testsuite name="kernel">
<directory suffix="Test.php">./web/modules/custom/**/tests/**/Kernel</directory>
</testsuite>
<testsuite name="unit">
<directory suffix="Test.php">./web/modules/custom/**/tests/**/Unit</directory>
</testsuite>
</testsuites>
</phpunit>