Make WordPress Core


Ignore:
Timestamp:
09/07/2020 03:12:17 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Add a polyfill for assertEqualsWithDelta() to WP_UnitTestCase and use it where appropriate.

assertEqualsWithDelta() was added in PHPUnit 7.5, while WordPress still supports PHPUnit 5.4.x as the minimum version.

See #38266.

File:
1 edited

Legend:

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

    r46625 r48952  
    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' );
    1415    class_alias( 'PHPUnit\Framework\TestSuite', 'PHPUnit_Framework_TestSuite' );
    1516    class_alias( 'PHPUnit\Framework\TestListener', 'PHPUnit_Framework_TestListener' );
Note: See TracChangeset for help on using the changeset viewer.