Make WordPress Core

Changeset 53902


Ignore:
Timestamp:
08/17/2022 09:03:06 PM (22 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r53874 r53902  
    217217
    218218define( 'WP_LANG_DIR', realpath( DIR_TESTDATA . '/languages' ) );
    219 define( 'WP_PLUGIN_DIR', realpath( DIR_TESTDATA . '/plugins' ) );
     219
     220if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
     221    define( 'WP_PLUGIN_DIR', realpath( DIR_TESTDATA . '/plugins' ) );
     222}
    220223
    221224if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) ) {
Note: See TracChangeset for help on using the changeset viewer.