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

This takes into account non-core plugins that rely on `WP_PLUGIN_DIR` being set to the expected plugin's directory in `WP_CONTENT_DIR`, or already have the constant defined.

Follow-up to [49236].

Props pierlo.
Fixes #51594.

git-svn-id: https://develop.svn.wordpress.org/trunk@49269 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-10-22 00:42:51 +00:00
parent 5b5eba1b54
commit cfbb2294f9

View File

@ -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 );