mirror of
https://gh.wpcy.net/https://github.com/discourse/wp-discourse.git
synced 2026-05-23 03:20:46 +08:00
25 lines
596 B
PHP
Vendored
25 lines
596 B
PHP
Vendored
<?php
|
|
/**
|
|
* PHPUnit bootstrap file
|
|
*
|
|
* @package Wp_Discourse
|
|
*/
|
|
|
|
$_tests_dir = getenv( 'WP_TESTS_DIR' );
|
|
if ( ! $_tests_dir ) {
|
|
$_tests_dir = '/tmp/wordpress-tests-lib';
|
|
}
|
|
|
|
// Give access to tests_add_filter() function.
|
|
require_once $_tests_dir . '/includes/functions.php';
|
|
|
|
/**
|
|
* Manually load the plugin being tested.
|
|
*/
|
|
function _manually_load_plugin() {
|
|
require dirname( dirname( dirname( __FILE__ ) ) ) . '/wp-discourse.php';
|
|
}
|
|
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
|
|
|
// Start up the WP testing environment.
|
|
require $_tests_dir . '/includes/bootstrap.php';
|