Make WordPress Core

Changeset 43316


Ignore:
Timestamp:
05/25/2018 10:47:39 PM (7 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Allow the unit test framework to be used without the data directory in place.

Fixes #43982

Merges [43315] to the 4.9 branch.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/tests/phpunit/includes/bootstrap.php

    r41966 r43316  
    6464    define( 'WP_DEFAULT_THEME', 'default' );
    6565}
    66 $wp_theme_directories = array( DIR_TESTDATA . '/themedir1' );
     66$wp_theme_directories = array();
     67
     68if ( file_exists( DIR_TESTDATA . '/themedir1' ) ) {
     69    $wp_theme_directories[] = DIR_TESTDATA . '/themedir1';
     70}
    6771
    6872system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval );
Note: See TracChangeset for help on using the changeset viewer.