From ddbe85a1a71d4bdf0dbc707910857a2d321c5b74 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 7 Aug 2013 10:09:35 +0000 Subject: [PATCH] Tests: Add support for storing your wp-test-config.php file a directory higher if you want to like we do for wp-config.php git-svn-id: https://develop.svn.wordpress.org/trunk@25008 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/includes/bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/includes/bootstrap.php b/tests/includes/bootstrap.php index b32409986a..c7a1244974 100644 --- a/tests/includes/bootstrap.php +++ b/tests/includes/bootstrap.php @@ -7,6 +7,10 @@ require_once 'PHPUnit/Autoload.php'; $config_file_path = dirname( __FILE__ ) . '/../wp-tests-config.php'; +if ( ! file_exists( $config_file_path ) ) { + // Support having the config file one level up. + $config_file_path = dirname( __FILE__ ) . '/../../wp-tests-config.php'; +} /* * Globalize some WordPress variables, because PHPUnit loads this file inside a function