Index: tests/bootstrap.php
===================================================================
--- tests/bootstrap.php	(revision 7410)
+++ tests/bootstrap.php	(working copy)
@@ -6,14 +6,33 @@
 	define( 'BP_TESTS_DIR', dirname( __FILE__ ) . '/' );
 }
 
-require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php';
+/**
+ * In the pre-develop.svn WP development environment, an environmental bash
+ * variable would be set to run PHP Unit tests. However, this has been done
+ * away with in a post-develop.svn world. We'll still check if this variable
+ * is set for backwards compat.
+ */
+if ( getenv( 'WP_TESTS_DIR' ) ) {
+	define( 'WP_TESTS_DIR', getenv( 'WP_TESTS_DIR' ) );
+	define( 'WP_TESTS_CONFIG_PATH', WP_TESTS_DIR . '/wp-tests-config.php' );
+}
+else {
+	define( 'WP_ROOT_DIR', dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) );
+	define( 'WP_TESTS_DIR', WP_ROOT_DIR . '/tests/phpunit' );
+	define( 'WP_TESTS_CONFIG_PATH', WP_ROOT_DIR . '/wp-tests-config.php' );
+}
 
+if ( ! file_exists( WP_TESTS_DIR . '/includes/functions.php' ) )
+	die( 'The WordPress PHPUnit test suite could not be found.' );
+
+require_once WP_TESTS_DIR . '/includes/functions.php';
+
 function _install_and_load_buddypress() {
 	require BP_TESTS_DIR . '/includes/loader.php';
 }
 tests_add_filter( 'muplugins_loaded', '_install_and_load_buddypress' );
 
-require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
+require WP_TESTS_DIR . '/includes/bootstrap.php';
 
 // Load the BP-specific testing tools
 require BP_TESTS_DIR . '/includes/testcase.php';
Index: tests/includes/install.php
===================================================================
--- tests/includes/install.php	(revision 7410)
+++ tests/includes/install.php	(working copy)
@@ -8,10 +8,11 @@
 error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
 
 $config_file_path = $argv[1];
-$multisite = ! empty( $argv[2] );
+$tests_dir_path = $argv[2];
+$multisite = ! empty( $argv[3] );
 
 require_once $config_file_path;
-require_once dirname( $config_file_path ) . '/includes/functions.php';
+require_once $tests_dir_path . '/includes/functions.php';
 
 function _load_buddypress() {
 	require dirname( dirname( dirname( __FILE__ ) ) ) . '/bp-loader.php';
Index: tests/includes/loader.php
===================================================================
--- tests/includes/loader.php	(revision 7410)
+++ tests/includes/loader.php	(working copy)
@@ -1,9 +1,6 @@
 <?php
-
-// Install BP
-$config_file_path = getenv( 'WP_TESTS_DIR' ) . '/wp-tests-config.php';
 $multisite = (int) ( defined( 'WP_TESTS_MULTISITE') && WP_TESTS_MULTISITE );
-system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $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';
