| 1 |
<?php |
| 2 |
/** |
| 3 |
* Tests bootstrapper |
| 4 |
* |
| 5 |
* @author X-Team <x-team.com> |
| 6 |
* @author Jonathan Bardo <jonathan.bardo@x-team.com> |
| 7 |
*/ |
| 8 |
|
| 9 |
// Use in code to trigger custom actions |
| 10 |
define( 'STREAM_TESTS', true ); |
| 11 |
define( 'WP_STREAM_DEV_DEBUG', true ); |
| 12 |
|
| 13 |
$_tests_dir = getenv('WP_TESTS_DIR'); |
| 14 |
if ( ! $_tests_dir ) { |
| 15 |
$_tests_dir = '/tmp/wordpress-tests-lib/'; |
| 16 |
} |
| 17 |
require_once $_tests_dir . 'includes/functions.php'; |
| 18 |
|
| 19 |
tests_add_filter( |
| 20 |
'muplugins_loaded', |
| 21 |
function() { |
| 22 |
// Manually load plugin |
| 23 |
require dirname( dirname( __FILE__ ) ) . '/stream.php'; |
| 24 |
} |
| 25 |
); |
| 26 |
|
| 27 |
require getenv( 'WP_TESTS_DIR' ) . 'includes/bootstrap.php'; |
| 28 |
require dirname( __FILE__ ) . '/testcase.php'; |
| 29 |
|