WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/22/2020 12:42:51 AM (11 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r49236 r49269  
    7878
    7979define( 'WP_LANG_DIR', realpath( DIR_TESTDATA . '/languages' ) );
    80 define( 'WP_PLUGIN_DIR', realpath( DIR_TESTDATA . '/plugins' ) );
     80
     81if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
     82    define( 'WP_PLUGIN_DIR', realpath( DIR_TESTDATA . '/plugins' ) );
     83}
    8184
    8285if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) ) {
Note: See TracChangeset for help on using the changeset viewer.