Make WordPress Core


Ignore:
Timestamp:
05/25/2021 01:07:43 AM (8 months ago)
Author:
SergeyBiryukov
Message:

Tests: Minimize the chances of signature conflicts for assertEqualsWithDelta().

The PHPUnit 7.5+ method assertEqualsWithDelta() was polyfilled for PHPUnit < 7.5, but also overloaded for PHPUnit 7.5 itself, which was not necessary and created a higher chance of signature conflicts, especially when the WP test suite is used as a basis for integration tests with plugins/themes.

This change removes the unnecessary overloading for PHPUnit 7.5+ and simplifies the overloaded method for PHPUnit < 7.5, including removing the IsEqual() class alias declaration, no longer needed.

Follow-up to [48952].

Props jrf.
See #52625.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/phpunit6/compat.php

    r48952 r50986  
    1212    class_alias( 'PHPUnit\Framework\Warning', 'PHPUnit_Framework_Warning' );
    1313    class_alias( 'PHPUnit\Framework\AssertionFailedError', 'PHPUnit_Framework_AssertionFailedError' );
    14     class_alias( 'PHPUnit\Framework\Constraint\IsEqual', 'PHPUnit_Framework_Constraint_IsEqual' );
    1514    class_alias( 'PHPUnit\Framework\TestSuite', 'PHPUnit_Framework_TestSuite' );
    1615    class_alias( 'PHPUnit\Framework\TestListener', 'PHPUnit_Framework_TestListener' );
Note: See TracChangeset for help on using the changeset viewer.