Ran
|
Files
36
|
Run time
10s
|
Badge
Embed ▾
README BADGES
|
push
github
AssertObjectNotEquals trait: polyfill the Assert::assertObjectNotEquals() method PHPUnit 11.2.0 introduced the new `Assert::assertObjectNotEquals()` method. This commit: * Adds two traits with the same name. One to polyfill the method when not available in PHPUnit. The other to allow for `use`-ing the trait in PHPUnit versions in which the method is already natively available. * Logic to the custom autoloader which will load the correct trait depending on the PHPUnit version used. * Adds tests. As the polyfill contains logic to match the PHPUnit native implementation as closely as possible, while still being PHP and PHPUnit cross-version compatible, extensive unit tests have been added to ensure the behaviour of the polyfill matches that of the original function. Includes: * Adding information on the new polyfill to the README. * Adding the new polyfill to the existing `TestCases` classes. * Updating the class docs for the `InvalidComparisonMethodException` and the `ComparatorValidator` classes. Refs: * https://github.com/sebastianbergmann/phpunit/issues/5811 * https://github.com/sebastianbergmann/phpunit/commit/8e3b7c185 Co-authored-by: Sebastian Bergmann <sb@sebastian-bergmann.de>
506 of 621 relevant lines covered (81.48%)
8.06 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|