phpunit.xml.dist 4.3 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>

3
<!-- TODO set checkForUnintentionallyCoveredCode="true" once https://www.drupal.org/node/2626832 is resolved. -->
4 5 6 7 8 9 10 11
<!-- TODO set printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter" once
 https://youtrack.jetbrains.com/issue/WI-24808 is resolved. Drupal provides a
 result printer that links to the html output results for functional tests.
 Unfortunately, this breaks the output of PHPStorm's PHPUnit runner. However, if
 using the command line you can add
 - -printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" to use it (note there
 should be no spaces between the hyphens).
-->
12 13 14 15
<phpunit bootstrap="tests/bootstrap.php" colors="true"
         beStrictAboutTestsThatDoNotTestAnything="true"
         beStrictAboutOutputDuringTests="true"
         beStrictAboutChangesToGlobalState="true"
16
         checkForUnintentionallyCoveredCode="false">
17 18 19 20 21
  <php>
    <!-- Set error reporting to E_ALL. -->
    <ini name="error_reporting" value="32767"/>
    <!-- Do not limit the amount of memory tests take to run. -->
    <ini name="memory_limit" value="-1"/>
22
    <!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
23
    <env name="SIMPLETEST_BASE_URL" value=""/>
24
    <!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
25
    <env name="SIMPLETEST_DB" value=""/>
26
    <!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->
27
    <env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
28
  </php>
29
  <testsuites>
30 31 32 33
    <testsuite name="unit">
      <directory>./tests/Drupal/Tests</directory>
      <directory>./modules/*/tests/src/Unit</directory>
      <directory>../modules/*/tests/src/Unit</directory>
34
      <directory>../profiles/*/tests/src/Unit</directory>
35 36 37 38 39 40
      <directory>../sites/*/modules/*/tests/src/Unit</directory>
      <!-- Exclude Composer's vendor directory so we don't run tests there. -->
      <exclude>./vendor</exclude>
      <!-- Exclude Drush tests. -->
      <exclude>./drush/tests</exclude>
    </testsuite>
41 42 43 44
    <testsuite name="kernel">
      <directory>./tests/Drupal/KernelTests</directory>
      <directory>./modules/*/tests/src/Kernel</directory>
      <directory>../modules/*/tests/src/Kernel</directory>
45
      <directory>../profiles/*/tests/src/Kernel</directory>
46 47 48 49 50 51
      <directory>../sites/*/modules/*/tests/src/Kernel</directory>
      <!-- Exclude Composer's vendor directory so we don't run tests there. -->
      <exclude>./vendor</exclude>
      <!-- Exclude Drush tests. -->
      <exclude>./drush/tests</exclude>
    </testsuite>
52 53 54 55
    <testsuite name="functional">
      <directory>./tests/Drupal/FunctionalTests</directory>
      <directory>./modules/*/tests/src/Functional</directory>
      <directory>../modules/*/tests/src/Functional</directory>
56
      <directory>../profiles/*/tests/src/Functional</directory>
57
      <directory>../sites/*/modules/*/tests/src/Functional</directory>
58 59 60 61
      <!-- Exclude Composer's vendor directory so we don't run tests there. -->
      <exclude>./vendor</exclude>
      <!-- Exclude Drush tests. -->
      <exclude>./drush/tests</exclude>
62
    </testsuite>
63 64 65 66 67 68 69 70 71 72 73
    <testsuite name="functional-javascript">
      <directory>./tests/Drupal/FunctionalJavascriptTests</directory>
      <directory>./modules/*/tests/src/FunctionalJavascript</directory>
      <directory>../modules/*/tests/src/FunctionalJavascript</directory>
      <directory>../profiles/*/tests/src/FunctionalJavascript</directory>
      <directory>../sites/*/modules/*/tests/src/FunctionalJavascript</directory>
      <!-- Exclude Composer's vendor directory so we don't run tests there. -->
      <exclude>./vendor</exclude>
      <!-- Exclude Drush tests. -->
      <exclude>./drush/tests</exclude>
    </testsuite>
74
  </testsuites>
75
  <listeners>
76 77
    <listener class="\Drupal\Tests\Listeners\DrupalStandardsListener">
    </listener>
78
  </listeners>
79 80
  <!-- Filter for coverage reports. -->
  <filter>
81 82 83 84 85 86
    <whitelist>
      <directory>./includes</directory>
      <directory>./lib</directory>
      <directory>./modules</directory>
      <directory>../modules</directory>
      <directory>../sites</directory>
87 88 89 90 91
      <!-- By definition test classes have no tests. -->
      <exclude>
        <directory suffix="Test.php">./</directory>
        <directory suffix="TestBase.php">./</directory>
      </exclude>
92
     </whitelist>
93
  </filter>
94
</phpunit>