Repository navigation
Expand file tree
/
Copy pathphpunit.xml
More file actions
71 lines (69 loc) · 3.63 KB
/
Copy pathphpunit.xml
File metadata and controls
71 lines (69 loc) · 3.63 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
<?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"
failOnRisky="true"
failOnWarning="true"
>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
<testsuite name="Browser">
<directory>tests/Browser</directory>
</testsuite>
</testsuites>
<!-- Inert unless CBOX_MEMORY_TRACE names a file: then it logs memory after every test,
which is how to find a test that leaves memory behind. See the class. -->
<extensions>
<bootstrap class="Tests\Support\Memory\TraceExtension"/>
</extensions>
<!-- `docs-screenshots` rewrites docs/screenshots/*.png from the running app
(tests/Browser/DocsScreenshotsTest.php). It writes into the working tree, so a plain
`vendor/bin/pest` leaves it out; asking for the group by name (the `group` option,
as that file's docblock shows, and as .github/workflows/docs-screenshots.yml does on
every release tag) runs it, because a group asked for by name is taken back off
this list. A command line that passes its own `exclude-group` replaces this list,
so it must name this group too. -->
<groups>
<exclude>
<group>docs-screenshots</group>
</exclude>
</groups>
<source>
<include>
<directory>app</directory>
<directory>modules</directory>
</include>
</source>
<php>
<!-- The suite boots the whole platform (Testbench + Pest 4 browser tests) and
does not fit in a stock 128M. Setting it here means the plain, documented
`vendor/bin/pest` works on any machine, instead of only where php.ini
happens to be generous or the caller remembered `-d memory_limit`.
1G is room, not need. Traced test by test (tests/Support/Memory), one process
running all of Unit + Feature peaks near 480M without OPcache: every test boots
a fresh application, and re-compiling its config, routes and views leaves ~40K
a test on the heap that only OPcache avoids. With OPcache on for the CLI, as CI
runs it (.github/php/ci.ini), the same run peaks near 200M. It was briefly 2G
after the console crawls tipped 1G near the end of a single-process CI run; CI
now splits the suites across runners and parallel workers, so no process sees
more than a fraction of them. If this has to go up again, trace it first. -->
<ini name="memory_limit" value="1G"/>
<!-- The suite-owned infrastructure (APP_ENV, CACHE_STORE, QUEUE_CONNECTION,
SESSION_DRIVER, …) is set in tests/bootstrap.php instead of here: `<env>`
writes $_ENV and putenv() but not $_SERVER, which is the first place
Laravel's Env repository looks, so a CI runner exporting
QUEUE_CONNECTION=redis silently won. See that file for the full account.
What stays here is DB_*, and only DB_*: the engines matrix deliberately
overrides it from the process environment to redirect the run at PostgreSQL
or MySQL, so it is the one thing the suite must NOT pin. -->
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="DB_URL" value=""/>
</php>
</phpunit>