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

Yoast / PHPUnit-Polyfills / 10744667604 / 27
97%
3.x: 98%

Build:
Build:
LAST BUILD BRANCH: 4.x
DEFAULT BRANCH: 3.x
Ran 06 Sep 2024 08:18PM UTC
Files 33
Run time 9s
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 Sep 2024 08:16PM UTC coverage: 80.402% (+0.9%) from 79.474%
10744667604.27

push

github

jrfnl
PHPUnit 11 | AssertArrayWithListKeys trait: polyfill the Assert::assertArrayIsEqualToArrayOnlyConsideringListOfKeys() et al methods

PHPUnit 11.0.0 introduces the new `Assert::assertArrayIsEqualToArrayOnlyConsideringListOfKeys()`, `Assert::assertArrayIsEqualToArrayIgnoringListOfKeys()`, `Assert::assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys()` and `Assert::assertArrayIsIdenticalToArrayIgnoringListOfKeys()` methods.

This commit:
* Adds two traits with the same name.
    One to polyfill the methods when not available in PHPUnit.
    The other - an empty trait - to allow for `use`-ing the trait in PHPUnit versions in which the methods are already natively available.
* Logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used.
* An availability test and limited functional tests for the functionality polyfilled.

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

Refs:
* sebastianbergmann/phpunit 5600
* sebastianbergmann/phpunit 5716
* sebastianbergmann/phpunit 5729

Co-authored-by: Sebastian Bergmann <sb@sebastian-bergmann.de>

480 of 597 relevant lines covered (80.4%)

7.1 hits per line

Source Files on job php-7.0-phpunit-6.4.4 - 10744667604.27
  • Tree
  • List 0
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10744667604
  • 31891230 on github
  • Prev Job for on feature/3.x/new-assertarraywithlistkeys-polyfill-trait (#10744635393.20)
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