| 1 |
<?php |
| 2 |
namespace WP_Stream; |
| 3 |
|
| 4 |
// Use in code to trigger custom actions |
| 5 |
define( 'WP_STREAM_TESTS', true ); |
| 6 |
define( 'WP_STREAM_DEV_DEBUG', true ); |
| 7 |
|
| 8 |
$_tests_dir = getenv('WP_TESTS_DIR'); |
| 9 |
if ( ! $_tests_dir ) { |
| 10 |
$_tests_dir = '/tmp/wordpress-tests-lib/'; |
| 11 |
} |
| 12 |
require_once $_tests_dir . '/includes/functions.php'; |
| 13 |
|
| 14 |
tests_add_filter( |
| 15 |
'muplugins_loaded', |
| 16 |
function() { |
| 17 |
// Manually load plugin |
| 18 |
require dirname( dirname( __FILE__ ) ) . '/stream.php'; |
| 19 |
} |
| 20 |
); |
| 21 |
|
| 22 |
require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php'; |
| 23 |
require dirname( __FILE__ ) . '/testcase.php'; |
| 24 |
|