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. git-svn-id: https://develop.svn.wordpress.org/trunk@45020 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cdd034f80f
commit
368ea6bfc5
@ -33,6 +33,7 @@ if ( ! is_readable( $config_file_path ) ) {
|
||||
echo "ERROR: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n";
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
require_once $config_file_path;
|
||||
require_once dirname( __FILE__ ) . '/functions.php';
|
||||
|
||||
@ -45,6 +46,11 @@ if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) {
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) {
|
||||
echo "ERROR: The /build/ directory is missing! Please run `grunt build` prior to running PHPUnit.\n";
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
tests_reset__SERVER();
|
||||
|
||||
define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
|
||||
|
Loading…
x
Reference in New Issue
Block a user