Tests: Allow override of MULTISITE
and SUBDOMAIN_INSTALL
constants
Props rmccue. Fixes #36567. git-svn-id: https://develop.svn.wordpress.org/trunk@37266 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
26f2705558
commit
f692459926
@ -42,12 +42,10 @@ define( 'WP_MAX_MEMORY_LIMIT', -1 );
|
|||||||
|
|
||||||
$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
|
$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
|
||||||
|
|
||||||
if ( "1" == getenv( 'WP_MULTISITE' ) ||
|
// Should we run in multisite mode?
|
||||||
( defined( 'WP_TESTS_MULTISITE') && WP_TESTS_MULTISITE ) ) {
|
$multisite = '1' == getenv( 'WP_MULTISITE' );
|
||||||
$multisite = true;
|
$multisite = $multisite || ( defined( 'WP_TESTS_MULTISITE') && WP_TESTS_MULTISITE );
|
||||||
} else {
|
$multisite = $multisite || ( defined( 'MULTISITE' ) && MULTISITE );
|
||||||
$multisite = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Override the PHPMailer
|
// Override the PHPMailer
|
||||||
require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
|
require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
|
||||||
@ -57,8 +55,8 @@ system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.ph
|
|||||||
|
|
||||||
if ( $multisite ) {
|
if ( $multisite ) {
|
||||||
echo "Running as multisite..." . PHP_EOL;
|
echo "Running as multisite..." . PHP_EOL;
|
||||||
define( 'MULTISITE', true );
|
defined( 'MULTISITE' ) or define( 'MULTISITE', true );
|
||||||
define( 'SUBDOMAIN_INSTALL', false );
|
defined( 'SUBDOMAIN_INSTALL' ) or define( 'SUBDOMAIN_INSTALL', false );
|
||||||
$GLOBALS['base'] = '/';
|
$GLOBALS['base'] = '/';
|
||||||
} else {
|
} else {
|
||||||
echo "Running as single site... To run multisite, use -c tests/phpunit/multisite.xml" . PHP_EOL;
|
echo "Running as single site... To run multisite, use -c tests/phpunit/multisite.xml" . PHP_EOL;
|
||||||
|
Loading…
Reference in New Issue
Block a user