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
This commit is contained in:
Peter Westwood 2013-08-07 10:09:35 +00:00
parent c366722810
commit ddbe85a1a7
1 changed files with 4 additions and 0 deletions

View File

@ -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