Make WordPress Core

Changeset 51333 for trunk


Ignore:
Timestamp:
07/06/2021 11:33:27 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Move loading compatibility layers for PHPUnit 6+ and 7.5+ closer together.

Follow-up to [40536], [44701], [50986].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r50986 r51333  
    33 * Installs WordPress for running the tests and loads WordPress and the test libraries
    44 */
    5 
    6 /**
    7  * Compatibility with PHPUnit 6+
    8  */
    9 if ( class_exists( 'PHPUnit\Runner\Version' ) ) {
    10     require_once __DIR__ . '/phpunit6/compat.php';
    11 }
    125
    136if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) {
     
    194187_delete_all_posts();
    195188
     189// Load class aliases for compatibility with PHPUnit 6+.
     190if ( version_compare( tests_get_phpunit_version(), '6.0', '>=' ) ) {
     191    require __DIR__ . '/phpunit6/compat.php';
     192}
     193
     194// Load separate WP_UnitTestCase classes for PHPUnit 7.5+ and older versions.
    196195if ( version_compare( tests_get_phpunit_version(), '7.5', '>=' ) ) {
    197196    require __DIR__ . '/phpunit7/testcase.php';
Note: See TracChangeset for help on using the changeset viewer.