Archived
23 lines
614 B
PHP
23 lines
614 B
PHP
<?php
|
|
|
|
require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php';
|
|
|
|
function _manually_load_plugin() {
|
|
require dirname( __FILE__ ) . '/../wp-seo.php';
|
|
}
|
|
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
|
|
|
require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
|
|
|
|
class WPSEO_TestCase extends WP_UnitTestCase {
|
|
// Put convenience methods here
|
|
// Here are two I use for faking things for save_post hooks, et al
|
|
function set_post( $key, $value ) {
|
|
$_POST[$key] = $_REQUEST[$key] = addslashes( $value );
|
|
}
|
|
|
|
function unset_post( $key ) {
|
|
unset( $_POST[$key], $_REQUEST[$key] );
|
|
}
|
|
}
|