| 1 |
<?php |
| 2 |
|
| 3 |
ini_set('display_errors','on'); |
| 4 |
error_reporting(E_ALL); |
| 5 |
|
| 6 |
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; |
| 7 |
$_SERVER['SERVER_NAME'] = ''; |
| 8 |
$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php'; |
| 9 |
|
| 10 |
$_tests_dir = getenv('WP_TESTS_DIR'); |
| 11 |
if ( !$_tests_dir ) $_tests_dir = '/tmp/wordpress-tests-lib'; |
| 12 |
|
| 13 |
require_once $_tests_dir . '/includes/functions.php'; |
| 14 |
|
| 15 |
// Force WP_ADMIN to be true |
| 16 |
define( 'WP_ADMIN', true ); |
| 17 |
|
| 18 |
function _manually_load_plugins() { |
| 19 |
require dirname( __FILE__ ) . '/../vimeography.php'; |
| 20 |
} |
| 21 |
tests_add_filter( 'muplugins_loaded', '_manually_load_plugins' ); |
| 22 |
|
| 23 |
require $_tests_dir . '/includes/bootstrap.php'; |
| 24 |
|
| 25 |
require dirname( __FILE__ ) . '/framework/testcase.php'; |
| 26 |
|
| 27 |
echo "Running Vimeography Tests...\n"; |
| 28 |
|
| 29 |
global $current_user; |
| 30 |
$current_user = new WP_User(1); |
| 31 |
$current_user->set_role('administrator'); |