mirror of
https://gh.wpcy.net/https://github.com/buddypress/buddypress.git
synced 2026-05-31 05:04:29 +08:00
BP's test installation routine is generally run from bootstrap.php. But in certain cases, as when the suite is being invoked from a BP-dependent plugin's tests, loader.php can be called directly, skipping bootstrap.php. For this reason, it makes sense to define constants in a separate file and then include that file as needed when the tests are first loaded, via either path. git-svn-id: https://buddypress.svn.wordpress.org/trunk@7665 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
9 lines
412 B
PHP
9 lines
412 B
PHP
<?php
|
|
|
|
require_once( dirname( __FILE__ ) . '/define-constants.php' );
|
|
|
|
$multisite = (int) ( defined( 'WP_TESTS_MULTISITE') && WP_TESTS_MULTISITE );
|
|
system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( WP_TESTS_CONFIG_PATH ) . ' ' . escapeshellarg( WP_TESTS_DIR ) . ' ' . $multisite );
|
|
|
|
// Bootstrap BP
|
|
require dirname( __FILE__ ) . '/../../bp-loader.php';
|