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

3 4 5 6 7 8
<!-- TODO set checkForUnintentionallyCoveredCode="true" once https://www.drupal.org/node/2626832 is resolved. -->
<phpunit bootstrap="tests/bootstrap.php" colors="true"
         beStrictAboutTestsThatDoNotTestAnything="true"
         beStrictAboutOutputDuringTests="true"
         beStrictAboutChangesToGlobalState="true"
         checkForUnintentionallyCoveredCode="false">
9 10 11 12 13
  <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"/>
14 15 16 17
    <env name="SIMPLETEST_BASE_URL" value=""/>
    <!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
    <env name="SIMPLETEST_DB" value=""/>
    <!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
18
  </php>
19
  <testsuites>
20 21 22 23
    <testsuite name="unit">
      <directory>./tests/Drupal/Tests</directory>
      <directory>./modules/*/tests/src/Unit</directory>
      <directory>../modules/*/tests/src/Unit</directory>
24
      <directory>../profiles/*/tests/src/Unit</directory>
25 26 27 28 29 30
      <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>
31 32 33 34
    <testsuite name="kernel">
      <directory>./tests/Drupal/KernelTests</directory>
      <directory>./modules/*/tests/src/Kernel</directory>
      <directory>../modules/*/tests/src/Kernel</directory>
35
      <directory>../profiles/*/tests/src/Kernel</directory>
36 37 38 39 40 41
      <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>
42 43 44 45
    <testsuite name="functional">
      <directory>./tests/Drupal/FunctionalTests</directory>
      <directory>./modules/*/tests/src/Functional</directory>
      <directory>../modules/*/tests/src/Functional</directory>
46
      <directory>../profiles/*/tests/src/Functional</directory>
47
      <directory>../sites/*/modules/*/tests/src/Functional</directory>
48 49 50 51
      <!-- Exclude Composer's vendor directory so we don't run tests there. -->
      <exclude>./vendor</exclude>
      <!-- Exclude Drush tests. -->
      <exclude>./drush/tests</exclude>
52 53
    </testsuite>
  </testsuites>
54
  <listeners>
55 56
    <listener class="\Drupal\Tests\Listeners\DrupalStandardsListener">
    </listener>
57
  </listeners>
58 59
  <!-- Filter for coverage reports. -->
  <filter>
60 61 62 63 64 65
    <whitelist>
      <directory>./includes</directory>
      <directory>./lib</directory>
      <directory>./modules</directory>
      <directory>../modules</directory>
      <directory>../sites</directory>
66 67 68 69 70
      <!-- By definition test classes have no tests. -->
      <exclude>
        <directory suffix="Test.php">./</directory>
        <directory suffix="TestBase.php">./</directory>
      </exclude>
71
     </whitelist>
72
  </filter>
73
</phpunit>