phpunit.xml.dist 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- TODO set checkForUnintentionallyCoveredCode="true" once https://www.drupal.org/node/2626832 is resolved. -->
  3. <!-- PHPUnit expects functional tests to be run with either a privileged user
  4. or your current system user. See core/tests/README.md and
  5. https://www.drupal.org/node/2116263 for details.
  6. -->
  7. <phpunit bootstrap="tests/bootstrap.php" colors="true"
  8. beStrictAboutTestsThatDoNotTestAnything="true"
  9. beStrictAboutOutputDuringTests="true"
  10. beStrictAboutChangesToGlobalState="true">
  11. <!-- TODO set printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter" once
  12. https://youtrack.jetbrains.com/issue/WI-24808 is resolved. Drupal provides a
  13. result printer that links to the html output results for functional tests.
  14. Unfortunately, this breaks the output of PHPStorm's PHPUnit runner. However, if
  15. using the command line you can add
  16. - -printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" to use it (note there
  17. should be no spaces between the hyphens).
  18. -->
  19. <php>
  20. <!-- Set error reporting to E_ALL. -->
  21. <ini name="error_reporting" value="32767"/>
  22. <!-- Do not limit the amount of memory tests take to run. -->
  23. <ini name="memory_limit" value="-1"/>
  24. <!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
  25. <env name="SIMPLETEST_BASE_URL" value=""/>
  26. <!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
  27. <env name="SIMPLETEST_DB" value=""/>
  28. <!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->
  29. <env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
  30. <!-- To disable deprecation testing uncomment the next line. -->
  31. <env name="SYMFONY_DEPRECATIONS_HELPER" value="weak_vendors"/>
  32. <!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' -->
  33. <!-- Example for changing the driver args to mink tests MINK_DRIVER_ARGS value: '["http://127.0.0.1:8510"]' -->
  34. <!-- Example for changing the driver args to phantomjs tests MINK_DRIVER_ARGS_PHANTOMJS value: '["http://127.0.0.1:8510"]' -->
  35. <!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '["firefox", null, "http://localhost:4444/wd/hub"]' -->
  36. </php>
  37. <testsuites>
  38. <testsuite name="unit">
  39. <file>./tests/TestSuites/UnitTestSuite.php</file>
  40. </testsuite>
  41. <testsuite name="kernel">
  42. <file>./tests/TestSuites/KernelTestSuite.php</file>
  43. </testsuite>
  44. <testsuite name="functional">
  45. <file>./tests/TestSuites/FunctionalTestSuite.php</file>
  46. </testsuite>
  47. <testsuite name="functional-javascript">
  48. <file>./tests/TestSuites/FunctionalJavascriptTestSuite.php</file>
  49. </testsuite>
  50. </testsuites>
  51. <listeners>
  52. <listener class="\Drupal\Tests\Listeners\DrupalListener">
  53. </listener>
  54. <!-- The Symfony deprecation listener has to come after the Drupal listener -->
  55. <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener">
  56. </listener>
  57. </listeners>
  58. <!-- Filter for coverage reports. -->
  59. <filter>
  60. <whitelist>
  61. <directory>./includes</directory>
  62. <directory>./lib</directory>
  63. <directory>./modules</directory>
  64. <directory>../modules</directory>
  65. <directory>../sites</directory>
  66. <!-- By definition test classes have no tests. -->
  67. <exclude>
  68. <directory suffix="Test.php">./</directory>
  69. <directory suffix="TestBase.php">./</directory>
  70. </exclude>
  71. </whitelist>
  72. </filter>
  73. </phpunit>