Repository navigation
Expand file tree
/
Copy pathphpunit.xml.dist
More file actions
60 lines (56 loc) · 2.77 KB
/
Copy pathphpunit.xml.dist
File metadata and controls
60 lines (56 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<!--
Schema is 10.5. Coverage include/exclude therefore lives in <source>,
not the 9.x <coverage> element, which now carries only report options.
This suite ran on PHPUnit 9.6 until wp_mock was dropped, not by choice:
10up/wp_mock 1.1.1 declares "phpunit/phpunit": "^9.6" in its own require
block and has no PHPUnit 10 branch, so asking for "^9.6|^10.0" alongside
it always resolved to 9.6. Brain Monkey declares no PHPUnit constraint at
all, which is what freed this.
-->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
failOnRisky="true"
failOnWarning="true">
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<!--
src/Admin is deliberately NOT excluded. It was, on the grounds
that admin screens are "render/menu/enqueue glue exercised
through the admin UI at runtime" — the same exclusion most of
the suite applied to its admin layer. Amber disproved it by
covering its entire src/Admin on this tooling, Integrity
followed, and tests/Unit/Admin now does the same here:
registration is asserted against WpState, capability guards
against the WpDieException the shared wp_die() throws, and the
render methods are driven for real inside an output buffer.
Do not re-add it. If a class here looks untestable, the reason
is almost always a redirect-and-exit — see the note in
DeveloperPageTest on splitting the work out from behind it.
-->
<!-- Pure interface declarations: no executable behaviour to cover. -->
<directory suffix=".php">src/Contracts</directory>
<!--
Test doubles Trusted ships for its own suite and for consuming
plugins. They live under src/ so they autoload through the
Trusted\ prefix in a consumer's test run, but they are test
infrastructure rather than production behaviour, and counting
them would distort the denominator exactly as src/Contracts
would. Matches Unity's exclusion of src/Testing.
-->
<directory suffix=".php">src/Testing</directory>
</exclude>
</source>
</phpunit>