diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index 81910e0701..65c1c370c4 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -77,7 +77,10 @@ define( 'DIR_TESTDATA', __DIR__ . '/../data' ); define( 'DIR_TESTROOT', realpath( dirname( __DIR__ ) ) ); define( 'WP_LANG_DIR', realpath( DIR_TESTDATA . '/languages' ) ); -define( 'WP_PLUGIN_DIR', realpath( DIR_TESTDATA . '/plugins' ) ); + +if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) { + define( 'WP_PLUGIN_DIR', realpath( DIR_TESTDATA . '/plugins' ) ); +} if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) ) { define( 'WP_TESTS_FORCE_KNOWN_BUGS', false );