Changeset 9999
- Timestamp:
- 07/03/2020 02:53:29 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tests/bootstrap.php
r9923 r9999 1 1 <?php 2 2 3 $_tests_dir = getenv( 'WP_TESTS_DIR' ); 4 if ( ! $_tests_dir ) { 5 $_tests_dir = '/tmp/wordpress-tests-lib'; 3 namespace WordPressdotorg\Plugin_Directory\Tests; 4 5 if ( 'cli' !== php_sapi_name() ) { 6 return; 6 7 } 7 8 8 require_once $_tests_dir . '/includes/functions.php';9 10 9 /** 11 * Load the plugin.10 * Manually load the plugin being tested. 12 11 */ 13 function _manually_load_plugin_directory_plugin() {12 function manually_load_plugin() { 14 13 require_once dirname( __FILE__ ) . '/../plugin-directory.php'; 15 14 } 16 15 17 tests_add_filter( 'muplugins_loaded', '_manually_load_plugin_directory_plugin' ); 18 19 require $_tests_dir . '/includes/bootstrap.php'; 16 tests_add_filter( 'muplugins_loaded', __NAMESPACE__ . '\manually_load_plugin' );
Note: See TracChangeset
for help on using the changeset viewer.