From 916695bd78e1ca0026afff2283a824840fd043e5 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 9 Jan 2019 11:13:03 +0000 Subject: [PATCH] Tests: Revert [44509]. This commit causes Travis to fail. See #45863. git-svn-id: https://develop.svn.wordpress.org/trunk@44512 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/bootstrap.php | 6 ++++++ wp-tests-config-sample.php | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index 47c59528be4b..eebc649efa43 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -36,6 +36,12 @@ require_once $config_file_path; require_once dirname( __FILE__ ) . '/functions.php'; +if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && file_exists( ABSPATH . '_index.php' ) ) { + // Perhaps add more documentation about having to run `grunt` before running tests after changing code. + echo "ERROR: ABSPATH must point to the `build` directory, not the `src` directory. Please update your wp-tests-config.php file.\n"; + exit( 1 ); +} + tests_reset__SERVER(); define( 'WP_TESTS_TABLE_PREFIX', $table_prefix ); diff --git a/wp-tests-config-sample.php b/wp-tests-config-sample.php index 5368d89e1ed4..2f6c515912f2 100644 --- a/wp-tests-config-sample.php +++ b/wp-tests-config-sample.php @@ -1,7 +1,11 @@