Make WordPress Core


Ignore:
Timestamp:
02/25/2018 06:06:49 PM (6 years ago)
Author:
adamsilverstein
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r42724 r42741  
    3737define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
    3838define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/../data' );
     39define( 'DIR_TESTROOT', realpath( dirname( dirname( __FILE__ ) ) ) );
    3940
    4041define( 'WP_LANG_DIR', DIR_TESTDATA . '/languages' );
Note: See TracChangeset for help on using the changeset viewer.