Unit Tests: add a DIR_TESTROOT constant to avoid relative paths.

Fix an issue that prevents tests from running correctly when run outside their normal context.

Props PressLabs, johnbillion.
Fixes #40071.



git-svn-id: https://develop.svn.wordpress.org/trunk@42741 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Adam Silverstein
2018-02-25 18:06:49 +00:00
parent d67a7c9b0b
commit d8a4215abb
2 changed files with 2 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ tests_reset__SERVER();
define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/../data' );
define( 'DIR_TESTROOT', realpath( dirname( dirname( __FILE__ ) ) ) );
define( 'WP_LANG_DIR', DIR_TESTDATA . '/languages' );