Skip to content

Commit 87f0223

Browse files
authored
DEV-1950: Convert phpunit.xml to be compatible with used phpunit version. (#54)
Co-authored-by: Petar <[email protected]>
1 parent b0b32aa commit 87f0223

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

phpunit.xml.dist

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,30 @@
55
or your current system user. See core/tests/README.md and
66
https://www.drupal.org/node/2116263 for details.
77
-->
8-
<phpunit bootstrap="web/core/tests/bootstrap.php" colors="true"
8+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
bootstrap="web/core/tests/bootstrap.php" colors="true"
910
beStrictAboutTestsThatDoNotTestAnything="true"
1011
beStrictAboutOutputDuringTests="true"
1112
beStrictAboutChangesToGlobalState="true"
12-
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter">
13+
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter"
14+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
15+
<coverage>
16+
<include>
17+
<directory>./web/core/includes</directory>
18+
<directory>./web/core/lib</directory>
19+
<directory>./web/core/modules</directory>
20+
<directory>./web/modules</directory>
21+
<directory>./web/sites</directory>
22+
</include>
23+
<exclude>
24+
<directory>./web/core/modules/*/src/Tests</directory>
25+
<directory>./web/core/modules/*/tests</directory>
26+
<directory>./web/modules/*/src/Tests</directory>
27+
<directory>./web/modules/*/tests</directory>
28+
<directory>./web/modules/*/*/src/Tests</directory>
29+
<directory>./web/modules/*/*/tests</directory>
30+
</exclude>
31+
</coverage>
1332
<php>
1433
<!-- Set error reporting to E_ALL. -->
1534
<ini name="error_reporting" value="32767"/>
@@ -24,13 +43,13 @@
2443
<!-- To disable deprecation testing completely uncomment the next line. -->
2544
<!-- <env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/> -->
2645
<!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' -->
27-
<env name="MINK_DRIVER_CLASS" value=''/>
46+
<env name="MINK_DRIVER_CLASS" value=""/>
2847
<!-- Example for changing the driver args to mink tests MINK_DRIVER_ARGS value: '["http://127.0.0.1:8510"]' -->
29-
<env name="MINK_DRIVER_ARGS" value=''/>
48+
<env name="MINK_DRIVER_ARGS" value=""/>
3049
<!-- Example for changing the driver args to phantomjs tests MINK_DRIVER_ARGS_PHANTOMJS value: '["http://127.0.0.1:8510"]' -->
3150
<env name="MINK_DRIVER_ARGS_PHANTOMJS" value=''/>
3251
<!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '["chrome", { "chromeOptions": { "w3c": false } }, "http://localhost:4444/wd/hub"]' For using the Firefox browser, replace "chrome" with "firefox" -->
33-
<env name="MINK_DRIVER_ARGS_WEBDRIVER" value='["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu", "--no-sandbox", "--headless"]}}, "http://127.0.0.1:9515"]'/>
52+
<env name="MINK_DRIVER_ARGS_WEBDRIVER" value="[&quot;chrome&quot;, {&quot;browserName&quot;:&quot;chrome&quot;,&quot;chromeOptions&quot;:{&quot;args&quot;:[&quot;--disable-gpu&quot;, &quot;--no-sandbox&quot;, &quot;--headless&quot;]}}, &quot;http://127.0.0.1:9515&quot;]"/>
3453
</php>
3554
<testsuites>
3655
<testsuite name="unit">
@@ -56,25 +75,4 @@
5675
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener">
5776
</listener>
5877
</listeners>
59-
<!-- Filter for coverage reports. -->
60-
<filter>
61-
<whitelist>
62-
<directory>./web/core/includes</directory>
63-
<directory>./web/core/lib</directory>
64-
<!-- Extensions can have their own test directories, so exclude those. -->
65-
<directory>./web/core/modules</directory>
66-
<exclude>
67-
<directory>./web/core/modules/*/src/Tests</directory>
68-
<directory>./web/core/modules/*/tests</directory>
69-
</exclude>
70-
<directory>./web/modules</directory>
71-
<exclude>
72-
<directory>./web/modules/*/src/Tests</directory>
73-
<directory>./web/modules/*/tests</directory>
74-
<directory>./web/modules/*/*/src/Tests</directory>
75-
<directory>./web/modules/*/*/tests</directory>
76-
</exclude>
77-
<directory>./web/sites</directory>
78-
</whitelist>
79-
</filter>
8078
</phpunit>

0 commit comments

Comments
 (0)