Make WordPress Core


Ignore:
Timestamp:
10/25/2016 11:05:17 AM (8 years ago)
Author:
pento
Message:

Tests: Fix a PHP notice introduced in [38907].

WP_DEFAULT_THEME was being defined in the wrong location.

Also, if WordPress has the original "default" theme installed, ensure that our test theme overrides it.

Props swissspidy for daring to dive into Themes of WordPress Past.
See #31550, #38457.

File:
1 edited

Legend:

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

    r38907 r38908  
    1010$multisite = ! empty( $argv[2] );
    1111
     12define( 'WP_INSTALLING', true );
     13require_once $config_file_path;
     14require_once dirname( __FILE__ ) . '/functions.php';
     15
    1216// Set the theme to our special empty theme, to avoid interference from the current Twenty* theme.
    1317if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
    1418    define( 'WP_DEFAULT_THEME', 'default' );
    1519}
    16 $wp_theme_directories = array( dirname( __FILE__ ) . '/../data/themedir1' );
    17 
    18 define( 'WP_INSTALLING', true );
    19 require_once $config_file_path;
    20 require_once dirname( __FILE__ ) . '/functions.php';
    2120
    2221tests_reset__SERVER();
     
    3332require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
    3433$phpmailer = new MockPHPMailer();
     34
     35register_theme_directory( dirname( __FILE__ ) . '/../data/themedir1' );
    3536
    3637/*
Note: See TracChangeset for help on using the changeset viewer.