| 1 |
<?php |
| 2 |
$_tests_dir = getenv( 'WP_TESTS_DIR' ); |
| 3 |
if ( ! $_tests_dir ) { |
| 4 |
$_tests_dir = '/tmp/wordpress-tests-lib'; |
| 5 |
} |
| 6 |
define('PLUGIN_NAME','wp-super-minify.php'); |
| 7 |
define('PLUGIN_FOLDER',basename(dirname( __DIR__ ))); |
| 8 |
define('PLUGIN_PATH',PLUGIN_FOLDER.'/'.PLUGIN_NAME); |
| 9 |
// Activates this plugin in WordPress so it can be tested. |
| 10 |
$GLOBALS['wp_tests_options'] = array( |
| 11 |
'active_plugins' => array( PLUGIN_PATH ), |
| 12 |
); |
| 13 |
require_once $_tests_dir . '/includes/functions.php'; |
| 14 |
function _manually_load_plugin() { |
| 15 |
require dirname( __DIR__ ) . '/'.PLUGIN_NAME; |
| 16 |
} |
| 17 |
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); |
| 18 |
require $_tests_dir . '/includes/bootstrap.php'; |
| 19 |
|
| 20 |
|