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

Yoast / PHPUnit-Polyfills / 12674739878
98%

Build:
DEFAULT BRANCH: 3.x
Ran 08 Jan 2025 04:24PM UTC
Jobs 31
Files 40
Run time 7min
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

08 Jan 2025 04:23PM UTC coverage: 97.912% (+0.4%) from 97.504%
12674739878

push

github

web-flow
PHPUnit 11.5.0 | AssertContainsOnly trait: polyfill the Assert::assertContains[Not]Only*() methods (#225)

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-8.2-phpunit-auto - 12674739878.1 08 Jan 2025 04:24PM UTC 40
3.36
GitHub Action Run
2 php-7.1-phpunit-auto - 12674739878.2 08 Jan 2025 04:24PM UTC 40
68.07
GitHub Action Run
3 php-8.0-phpunit-auto - 12674739878.3 08 Jan 2025 04:24PM UTC 40
50.65
GitHub Action Run
4 php-7.3-phpunit-phar-7 - 12674739878.4 08 Jan 2025 04:24PM UTC 40
68.61
GitHub Action Run
5 php-8.2-phpunit-~11.1.0 - 12674739878.5 08 Jan 2025 04:24PM UTC 40
27.55
GitHub Action Run
6 php-7.2-phpunit-~7.1.0 - 12674739878.6 08 Jan 2025 04:24PM UTC 40
81.31
GitHub Action Run
7 php-8.1-phpunit-auto - 12674739878.7 08 Jan 2025 04:24PM UTC 40
50.65
GitHub Action Run
8 php-8.4-phpunit-11.3.6 - 12674739878.8 08 Jan 2025 04:24PM UTC 40
14.69
GitHub Action Run
9 php-8.4-phpunit-auto - 12674739878.9 08 Jan 2025 04:24PM UTC 40
3.36
GitHub Action Run
10 php-8.2-phpunit-phar-11.0 - 12674739878.10 08 Jan 2025 04:24PM UTC 40
27.69
GitHub Action Run
11 php-7.4-phpunit-auto - 12674739878.11 08 Jan 2025 04:24PM UTC 40
51.37
GitHub Action Run
12 php-8.3-phpunit-11.0.0 - 12674739878.12 08 Jan 2025 04:24PM UTC 40
27.55
GitHub Action Run
13 php-7.0-phpunit-6.4.4 - 12674739878.13 08 Jan 2025 04:25PM UTC 40
83.59
GitHub Action Run
14 php-8.3-phpunit-auto - 12674739878.14 08 Jan 2025 04:24PM UTC 40
3.36
GitHub Action Run
15 php-7.3-phpunit-auto - 12674739878.15 08 Jan 2025 04:24PM UTC 40
51.23
GitHub Action Run
16 php-7.2-phpunit-phar-6 - 12674739878.16 08 Jan 2025 04:24PM UTC 40
83.99
GitHub Action Run
17 php-8.2-phpunit-9.3.0 - 12674739878.17 08 Jan 2025 04:24PM UTC 40
61.18
GitHub Action Run
18 php-7.0-phpunit-auto - 12674739878.18 08 Jan 2025 04:25PM UTC 40
83.59
GitHub Action Run
19 php-7.3-phpunit-phar-9.0 - 12674739878.19 08 Jan 2025 04:24PM UTC 40
64.56
GitHub Action Run
20 php-7.2-phpunit-auto - 12674739878.20 08 Jan 2025 04:24PM UTC 40
64.8
GitHub Action Run
21 php-8.0-phpunit-9.3.0 - 12674739878.21 08 Jan 2025 04:24PM UTC 40
61.18
GitHub Action Run
22 php-7.3-phpunit-7.2.7 - 12674739878.22 08 Jan 2025 04:24PM UTC 40
81.56
GitHub Action Run
23 php-7.1-phpunit-~6.4.4 - 12674739878.23 08 Jan 2025 04:24PM UTC 40
83.72
GitHub Action Run
24 php-7.4-phpunit-phar-8 - 12674739878.24 08 Jan 2025 04:31PM UTC 40
65.57
GitHub Action Run
25 php-7.2-phpunit-phar-8.0 - 12674739878.25 08 Jan 2025 04:31PM UTC 40
68.36
GitHub Action Run
26 php-8.4-phpunit-phar-11 - 12674739878.26 08 Jan 2025 04:31PM UTC 40
3.36
GitHub Action Run
27 php-8.4-phpunit-phar-9 - 12674739878.27 08 Jan 2025 04:31PM UTC 40
50.94
GitHub Action Run
28 php-7.4-phpunit-8.1.6 - 12674739878.28 08 Jan 2025 04:24PM UTC 40
68.61
GitHub Action Run
29 php-8.3-phpunit-phar-11 - 12674739878.29 08 Jan 2025 04:31PM UTC 40
3.36
GitHub Action Run
30 php-7.4-phpunit-9.6.10 - 12674739878.30 08 Jan 2025 04:24PM UTC 40
58.73
GitHub Action Run
31 php-8.1-phpunit-9.3.0 - 12674739878.31 08 Jan 2025 04:24PM UTC 40
61.18
GitHub Action Run
Source Files on build 12674739878
  • Tree
  • List 40
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12674739878
  • 0298bb34 on github
  • Prev Build on 3.x (#12661194887)
  • Next Build on 3.x (#12675364893)
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

© 2025 Coveralls, Inc