buddypress/tests/includes/loader.php
Boone B Gorges c60fae9065 In test suite, break constant definitions into separate file
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
2013-12-12 20:48:46 +00:00

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';