Build/Test Tools: Only define WP_PLUGIN_DIR when running core tests.

This takes into account plugin or theme test suites that rely on `WP_PLUGIN_DIR` being set to a custom path.

Follow-up to [49236], [49269], [49566], [53874].

Props aaemnnosttv, flixos90.
Fixes #39210.

git-svn-id: https://develop.svn.wordpress.org/trunk@53902 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-08-17 21:03:06 +00:00
parent 4a2130228f
commit 3ef65f72bd

View File

@ -216,7 +216,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 );