Changeset 47198 for trunk/tests/phpunit/includes/bootstrap.php
- Timestamp:
- 02/06/2020 06:31:22 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/bootstrap.php
r47156 r47198 8 8 */ 9 9 if ( class_exists( 'PHPUnit\Runner\Version' ) ) { 10 require_once dirname( __FILE__ ). '/phpunit6/compat.php';10 require_once __DIR__ . '/phpunit6/compat.php'; 11 11 } 12 12 … … 14 14 $config_file_path = WP_TESTS_CONFIG_FILE_PATH; 15 15 } else { 16 $config_file_path = dirname( dirname( __FILE__ ));16 $config_file_path = dirname( __DIR__ ); 17 17 if ( ! file_exists( $config_file_path . '/wp-tests-config.php' ) ) { 18 18 // Support the config file from the root of the develop repository. … … 36 36 37 37 require_once $config_file_path; 38 require_once dirname( __FILE__ ). '/functions.php';38 require_once __DIR__ . '/functions.php'; 39 39 40 40 if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) { … … 55 55 56 56 define( 'WP_TESTS_TABLE_PREFIX', $table_prefix ); 57 define( 'DIR_TESTDATA', dirname( __FILE__ ). '/../data' );58 define( 'DIR_TESTROOT', realpath( dirname( dirname( __FILE__ )) ) );57 define( 'DIR_TESTDATA', __DIR__ . '/../data' ); 58 define( 'DIR_TESTROOT', realpath( dirname( __DIR__ ) ) ); 59 59 60 60 define( 'WP_LANG_DIR', DIR_TESTDATA . '/languages' ); … … 85 85 86 86 // Override the PHPMailer. 87 require_once ( dirname( __FILE__ ) . '/mock-mailer.php' );87 require_once __DIR__ . '/mock-mailer.php'; 88 88 $phpmailer = new MockPHPMailer( true ); 89 89 … … 98 98 99 99 if ( '1' !== getenv( 'WP_TESTS_SKIP_INSTALL' ) ) { 100 system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ). '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval );100 system( WP_PHP_BINARY . ' ' . escapeshellarg( __DIR__ . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval ); 101 101 if ( 0 !== $retval ) { 102 102 exit( $retval ); … … 140 140 141 141 if ( version_compare( tests_get_phpunit_version(), '7.0', '>=' ) ) { 142 require dirname( __FILE__ ). '/phpunit7/testcase.php';142 require __DIR__ . '/phpunit7/testcase.php'; 143 143 } else { 144 require dirname( __FILE__ ). '/testcase.php';145 } 146 147 require dirname( __FILE__ ). '/testcase-rest-api.php';148 require dirname( __FILE__ ). '/testcase-rest-controller.php';149 require dirname( __FILE__ ). '/testcase-rest-post-type-controller.php';150 require dirname( __FILE__ ). '/testcase-xmlrpc.php';151 require dirname( __FILE__ ). '/testcase-ajax.php';152 require dirname( __FILE__ ). '/testcase-canonical.php';153 require dirname( __FILE__ ). '/exceptions.php';154 require dirname( __FILE__ ). '/utils.php';155 require dirname( __FILE__ ). '/spy-rest-server.php';156 require dirname( __FILE__ ). '/class-wp-rest-test-search-handler.php';157 require dirname( __FILE__ ). '/class-wp-fake-block-type.php';144 require __DIR__ . '/testcase.php'; 145 } 146 147 require __DIR__ . '/testcase-rest-api.php'; 148 require __DIR__ . '/testcase-rest-controller.php'; 149 require __DIR__ . '/testcase-rest-post-type-controller.php'; 150 require __DIR__ . '/testcase-xmlrpc.php'; 151 require __DIR__ . '/testcase-ajax.php'; 152 require __DIR__ . '/testcase-canonical.php'; 153 require __DIR__ . '/exceptions.php'; 154 require __DIR__ . '/utils.php'; 155 require __DIR__ . '/spy-rest-server.php'; 156 require __DIR__ . '/class-wp-rest-test-search-handler.php'; 157 require __DIR__ . '/class-wp-fake-block-type.php'; 158 158 159 159 /**
Note: See TracChangeset
for help on using the changeset viewer.