• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / PHPUnit-Polyfills / 12624723044
98%
3.x: 98%

Build:
Build:
LAST BUILD BRANCH: 4.x
DEFAULT BRANCH: 3.x
Ran 06 Jan 2025 01:15AM UTC
Jobs 31
Files 40
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Jan 2025 01:14AM UTC coverage: 97.912% (+0.4%) from 97.504%
12624723044

push

github

jrfnl
PHPUnit 11.5.0 | AssertContainsOnly trait: polyfill the Assert::assertContains[Not]Only*() methods

PHPUnit 11.5.0 introduced a range of new assertions. These assertions are specialized alternatives to the pre-existing `assert[Not]ContainsOnly()` methods, which are now soft deprecated and will be removed in PHPUnit 13.0.

This commit:
* Adds two traits with the same name.
    One to polyfill the methods when not available in PHPUnit.
    The other to allow for `use`-ing the trait in PHPUnit versions in which the methods are already natively available.
* Adds logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used.
* Adds tests.

Most polyfilled methods can just fall-through to the pre-existing methods as a polyfill.
The exceptions to this rule are:
* `assertContains[Not]OnlyIterable()` which needs custom logic for PHPUnit < 7.1.0 in which the PHP native `iterable` type was not yet supported.
* `assertContains[Not]OnlyClosedResource()` which needs custom logic for PHP < 7.2 in which the PHP native `resource (closed)` type did not exist yet.
    In this last case, the custom logic is used for the polyfill on all PHP versions as there is no functional check (in contrast to a version check) which can be used to determine whether the `resource (closed)` type is available.

All new methods are loosely tested.

Includes:
* Adding information on the new polyfill to the README.
* Adding the new polyfill to the existing `TestCases` classes.

Refs:
* https://github.com/sebastianbergmann/phpunit/commit/a726e0396

Fixes 214

133 of 133 new or added lines in 1 file covered. (100.0%)

797 of 814 relevant lines covered (97.91%)

127.58 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-7.3-phpunit-auto - 12624723044.1 06 Jan 2025 01:15AM UTC 0
51.23
GitHub Action Run
2 php-8.1-phpunit-auto - 12624723044.2 06 Jan 2025 01:15AM UTC 0
50.65
GitHub Action Run
3 php-7.3-phpunit-phar-7 - 12624723044.3 06 Jan 2025 01:15AM UTC 0
68.61
GitHub Action Run
4 php-7.4-phpunit-auto - 12624723044.4 06 Jan 2025 01:15AM UTC 0
51.37
GitHub Action Run
5 php-8.2-phpunit-auto - 12624723044.5 06 Jan 2025 01:15AM UTC 0
3.36
GitHub Action Run
6 php-8.3-phpunit-auto - 12624723044.6 06 Jan 2025 01:15AM UTC 0
3.36
GitHub Action Run
7 php-7.4-phpunit-phar-8 - 12624723044.7 06 Jan 2025 01:15AM UTC 0
65.57
GitHub Action Run
8 php-8.0-phpunit-9.3.0 - 12624723044.8 06 Jan 2025 01:15AM UTC 0
61.18
GitHub Action Run
9 php-8.4-phpunit-auto - 12624723044.9 06 Jan 2025 01:15AM UTC 0
3.36
GitHub Action Run
10 php-7.2-phpunit-auto - 12624723044.10 06 Jan 2025 01:15AM UTC 0
64.8
GitHub Action Run
11 php-7.2-phpunit-phar-6 - 12624723044.11 06 Jan 2025 01:15AM UTC 0
83.99
GitHub Action Run
12 php-7.2-phpunit-~7.1.0 - 12624723044.12 06 Jan 2025 01:15AM UTC 0
81.31
GitHub Action Run
13 php-7.3-phpunit-7.2.7 - 12624723044.13 06 Jan 2025 01:15AM UTC 0
81.56
GitHub Action Run
14 php-7.2-phpunit-phar-8.0 - 12624723044.14 06 Jan 2025 01:15AM UTC 0
68.36
GitHub Action Run
15 php-8.1-phpunit-9.3.0 - 12624723044.15 06 Jan 2025 01:15AM UTC 0
61.18
GitHub Action Run
16 php-8.0-phpunit-auto - 12624723044.16 06 Jan 2025 01:15AM UTC 0
50.65
GitHub Action Run
17 php-7.0-phpunit-6.4.4 - 12624723044.17 06 Jan 2025 01:16AM UTC 0
83.59
GitHub Action Run
18 php-8.2-phpunit-~11.1.0 - 12624723044.18 06 Jan 2025 01:16AM UTC 0
27.55
GitHub Action Run
19 php-8.2-phpunit-phar-11.0 - 12624723044.19 06 Jan 2025 01:18AM UTC 0
27.69
GitHub Action Run
20 php-7.1-phpunit-~6.4.4 - 12624723044.20 06 Jan 2025 01:15AM UTC 0
83.72
GitHub Action Run
21 php-8.3-phpunit-11.0.0 - 12624723044.21 06 Jan 2025 01:15AM UTC 0
27.55
GitHub Action Run
22 php-8.4-phpunit-phar-9 - 12624723044.22 06 Jan 2025 01:18AM UTC 0
50.94
GitHub Action Run
23 php-8.2-phpunit-9.3.0 - 12624723044.23 06 Jan 2025 01:15AM UTC 0
61.18
GitHub Action Run
24 php-8.4-phpunit-11.3.6 - 12624723044.24 06 Jan 2025 01:15AM UTC 0
14.69
GitHub Action Run
25 php-8.3-phpunit-phar-11 - 12624723044.25 06 Jan 2025 01:18AM UTC 0
3.36
GitHub Action Run
26 php-8.4-phpunit-phar-11 - 12624723044.26 06 Jan 2025 01:18AM UTC 0
3.36
GitHub Action Run
27 php-7.3-phpunit-phar-9.0 - 12624723044.27 06 Jan 2025 01:15AM UTC 0
64.56
GitHub Action Run
28 php-7.4-phpunit-8.1.6 - 12624723044.28 06 Jan 2025 01:15AM UTC 0
68.61
GitHub Action Run
29 php-7.1-phpunit-auto - 12624723044.29 06 Jan 2025 01:15AM UTC 0
68.07
GitHub Action Run
30 php-7.4-phpunit-9.6.10 - 12624723044.30 06 Jan 2025 01:15AM UTC 0
58.73
GitHub Action Run
31 php-7.0-phpunit-auto - 12624723044.31 06 Jan 2025 01:16AM UTC 0
83.59
GitHub Action Run
Source Files on build 12624723044
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #12624723044
  • ce2619f4 on github
  • Prev Build on 3.x (#12624717350)
  • Next Build on feature/214-support-phpunit-11.5.0 (#12660708723)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc