[db-host] [wp-version]\n"; exit( 1 ); } // Load the WP test suite functions. require_once $_tests_dir . '/includes/functions.php'; /** * Register the theme so WordPress loads it during test setup. */ function _register_theme() { $theme_dir = dirname( __DIR__ ); $theme_name = basename( $theme_dir ); // Tell WordPress where our theme lives. register_theme_directory( dirname( $theme_dir ) ); add_filter( 'pre_option_stylesheet', function () use ( $theme_name ) { return $theme_name; } ); add_filter( 'pre_option_template', function () use ( $theme_name ) { return $theme_name; } ); } tests_add_filter( 'muplugins_loaded', '_register_theme' ); // Boot the WP test framework. require $_tests_dir . '/includes/bootstrap.php';