This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
studio-2013/wp-content/plugins/wordpress-seo/tests/bootstrap.php
T
2013-06-27 19:24:04 +02:00

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] );
}
}