-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathphpunit.xml
More file actions
61 lines (60 loc) · 3.21 KB
/
Copy pathphpunit.xml
File metadata and controls
61 lines (60 loc) · 3.21 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
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
stopOnFailure="false">
<!--
Real-service test gate (parity with the Python master's conftest.py hook).
When TINA4_REQUIRE_SERVICES is truthy (CI sets it to '1'), a test that
SKIPS because a PROVISIONED service (PostgreSQL/MySQL/MSSQL/Redis/Valkey/
Memcached/MongoDB/RabbitMQ/Kafka) or its client library is missing is turned
into a hard FAILURE. MySQL and MSSQL/SQL Server joined the provisioned set
in 3.13.44 (#262) and are in RequireServicesGate::SERVICE_KEYWORDS; only
Firebird is NOT provisioned, so its skips stay green. With the flag unset
(local default), skips are unchanged.
The extension subscribes to BOTH Test\Skipped and TestSuite\Skipped: a skip
from setUpBeforeClass() emits only the latter, so listening to the per-test
event alone let a class-wide service gate skip GREEN.
-->
<extensions>
<bootstrap class="Tina4\Testing\RequireServicesExtension"/>
<!--
Handler-stack hygiene (test-infra only). ErrorTracker::register()
installs a process-lifetime error+exception handler pair and tracks it
in a private static $handlerDepth; a test that leaves $handlerDepth > 0
makes a LATER test's reset() pop handlers outside its own boundary,
which PHPUnit flags "removed error/exception handlers other than its
own" (surfaced across the suite once tina4-php#178 made ~78 dormant
test files run). This extension resets $handlerDepth to its suite
baseline before each test. It touches ONLY the test-scoped static
counter (reflection) — no OS handler and no framework runtime code —
so production is unaffected. See HandlerStackHygieneExtension.
-->
<bootstrap class="Tina4\Testing\HandlerStackHygieneExtension"/>
</extensions>
<testsuites>
<testsuite name="Tina4 Frond Tests">
<file>tests/FrondTest.php</file>
</testsuite>
<testsuite name="Tina4 v3 Tests">
<!--
Directory discovery (parity with Python testpaths / Ruby rspec /
Node readdirSync): every tests/*Test.php is collected automatically,
so a new test file gates CI the moment it lands. The old hand-kept
<file> list silently dropped 78 of 186 classes from CI - including
SessionCookieAttributesTest, the #174 security regression
(tina4-php#178). The FrondTest and SmokeTest suites below own those
two files, so they are excluded here to avoid running twice.
ConfiguredTestFilesTest guards this so a file can never fall out of
CI again.
-->
<directory suffix="Test.php">tests</directory>
<exclude>tests/FrondTest.php</exclude>
<exclude>tests/SmokeTest.php</exclude>
</testsuite>
<testsuite name="Tina4 Smoke Test">
<file>tests/SmokeTest.php</file>
</testsuite>
</testsuites>
</phpunit>