WordPress.org

Make WordPress Core

Changeset 45020


Ignore:
Timestamp:
03/26/2019 11:52:03 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Display an error message with a recommendation to run grunt build when trying to run WordPress core tests without the /build/ directory.

Props davidbaumwald.
Fixes #46593.

File:
1 edited

Legend:

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

    r44723 r45020  
    3434    exit( 1 );
    3535}
     36
    3637require_once $config_file_path;
    3738require_once dirname( __FILE__ ) . '/functions.php';
     
    4344    );
    4445    echo "Please use the latest PHPUnit version from the 7.x branch.\n";
     46    exit( 1 );
     47}
     48
     49if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) {
     50    echo "ERROR: The /build/ directory is missing! Please run `grunt build` prior to running PHPUnit.\n";
    4551    exit( 1 );
    4652}
Note: See TracChangeset for help on using the changeset viewer.