forked from OpenCatalogi/opencatalogi
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathphpunit.xml
More file actions
82 lines (74 loc) · 3.29 KB
/
Copy pathphpunit.xml
File metadata and controls
82 lines (74 loc) · 3.29 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8"?>
<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="default"
defaultTestSuite="Unit Tests"
requireCoverageMetadata="false"
beStrictAboutCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
failOnRisky="false"
failOnWarning="false"
failOnDeprecation="false">
<testsuites>
<testsuite name="Unit Tests">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Integration Tests">
<directory>tests/Integration</directory>
</testsuite>
</testsuites>
<!--
Exclude the @group network tests by default. They drive
DirectoryService::syncDirectory / BroadcastService::broadcast through the SSRF
outbound-URL guard, which performs real DNS resolution and hangs in CI runners
without outbound DNS (the original reason PHPUnit was disabled here; see
.github/workflows/code-quality.yml). Run them with the network group in an
environment that has outbound DNS.
-->
<groups>
<exclude>
<group>network</group>
</exclude>
</groups>
<source>
<include>
<directory suffix=".php">lib/</directory>
</include>
<exclude>
<!--
FIRST coverage exclusion in this repo, so it is spelled out.
This repair step's body is ALTER TABLE / UPDATE against shard
tables resolved at runtime, and it cannot be unit-tested here:
mocking IDBConnection requires doctrine/dbal, which this app does
not install, and OCP's IQueryBuilder references
Doctrine\DBAL\ParameterType, so createMock() throws before any
assertion runs. run()/shardTables()/columnsOf()/exec() therefore
have no reachable unit path and would sit permanently uncovered,
dragging the ratchet down for every future change to this file.
Excluded from MEASUREMENT only. The decision logic IS tested —
tests/Unit/Repair/RenameDutchPublicationColumnsTest.php pins the
schema-suffix match, the openregister-marker requirement, that
`publicatiedatum` is in the map at all (ORI feed visibility is
governed by `publicatiedatum <= now`), and the map invariants.
Those tests still run on every job.
Sibling apps openbuild and decidesk already exclude lib/Migration/
for the same reason: DDL against a live database is integration
territory, not unit territory.
-->
<file>lib/Repair/RenameDutchPublicationColumns.php</file>
</exclude>
</source>
<coverage>
<report>
<clover outputFile="coverage/clover.xml"/>
<html outputDirectory="coverage/html"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
</report>
</coverage>
<php>
<env name="PHPUNIT_RUN" value="1"/>
</php>
</phpunit>