← Catalogue

phpunit

PHPUnit's `There were N failures` block through to its `FAILURES`/`ERRORS`/`OK` footer.

phptesttoolmatcher

Open in playgroundFile on GitHubHistory

Install: ci-doctor matchers add official/phpunit

matchers/php/phpunit/matcher.yaml

id: phpunitrole: toolclassification: [php, test]description: PHPUnit's `There were N failures` block through to its `FAILURES`/`ERRORS`/`OK` footer.start: ^There (was|were) \d+ (failure|error)end: ^(FAILURES|ERRORS|OK)

In bundles

allphp

Fixtures

Framing stripped per provider. Highlighted lines are what this matcher selects; the marked line is the anchor.

phpunit_failureOpen in playground

1Current runner version: '2.336.0'
2##[group]Operating System
3Ubuntu
424.04.4
5LTS
6##[endgroup]
7Secret source: Actions
8Prepare workflow directory
9Prepare all required actions
10Complete job name: phpunit_failure
11##[group]Set up job
12Image: ubuntu-24.04
13Runner name: 'GitHub Actions 12'
14##[endgroup]
15Download action repository 'actions/checkout@v4'
16Download action repository 'actions/cache@v4'
17##[group]Run actions/checkout@v4
18 with:
19 fetch-depth: 20
20 lfs: false
21##[endgroup]
22Syncing repository: acme/ledger
23##[group]Getting Git version info
24Working directory is '/home/runner/work/ledger/ledger'
25##[endgroup]
26/usr/bin/git checkout --progress --force 8ad41f02
27##[group]Run actions/cache@v4
28 with:
29 path: ~/.cache
30 key: Linux-deps-8ad41f02
31##[endgroup]
32Received 41943040 of 41943040 (100.0%), 40.0 MBs/sec
33Cache restored from key: Linux-deps-8ad41f02
34##[group]Run php --version
35php --version
36composer install --no-interaction --no-progress
37vendor/bin/phpunit --colors=never
38shell: /usr/bin/bash -e {0}
39##[endgroup]
40PHP 8.3.7 (cli) (built: May 15 2024 10:22:11) (NTS)
41Installing dependencies from lock file (including require-dev)
42Generating optimized autoload files
43PHPUnit 10.5.20 by Sebastian Bergmann and contributors.
44
45Runtime: PHP 8.3.7
46Configuration: /builds/team/shop/phpunit.xml
47
48...............F......... 25 / 25 (100%)
49
50Time: 00:01.284, Memory: 24.00 MB
51
52There was 1 failure:
53
541) App\Tests\Pricing\VatCalculatorTest::testAppliesReducedRate
55Failed asserting that 2000 matches expected 1900.
56
57/builds/team/shop/tests/Pricing/VatCalculatorTest.php:41
58
59FAILURES!
60Tests: 25, Assertions: 63, Failures: 1.
61##[error]Process completed with exit code 1.
62##[group]Post Run actions/checkout@v4
63##[endgroup]
64/usr/bin/git version
65git version 2.54.0
66##[group]Post Run actions/upload-artifact@v4
67##[endgroup]
68Artifact upload complete.
69Post job cleanup.
70Cleaning up orphan processes