Properties

$is_admin

$is_admin : 

Should we test in admin environment?

Methods

setUp()

setUp() 

tearDown()

tearDown() 

get_plugin_under_test()

get_plugin_under_test() : array

Get the main plugin under test

Returns

array

get_extra_plugins()

get_extra_plugins() : array

Get a list of extra plugins that should be loaded and activated for testing

This can include fxitures if needed.

Returns

array

get_all_plugins()

get_all_plugins() : array

Get a list of all plugins, including the plugin under test and extra ones

Returns

array

prepare_plugin_directories()

prepare_plugin_directories() 

Prepare plugin directories

This should create symlinks to the plugins' folders from wp-content/plugins directory so that they can be activated and used later on

load_plugins_for_current_process()

load_plugins_for_current_process() 

Load all required plugins for current process

This should be called by extending testcases explicitly. This only loads actual plugins, not fixtures.

pre_option_active_plugins()

pre_option_active_plugins() : array

Filter `pre_option_active_plugins` hook.

Returns

array

load_fixtures()

load_fixtures(  $file_name = null) 

This should be used explicitly by extending testcases

Parameters

$file_name

bootstrap_plugin()

bootstrap_plugin() 

get_wp_version()

get_wp_version(  $version = '') : mixed

Get current WP version

If a WP version is provided as the first parameter, check if the current WP version is greater than or equal to that provided version

Parameters

$version

Returns

mixed

uniqid()

uniqid() : string

Returns

string

prepare_default_values()

prepare_default_values() 

Prepare default values including options and active plugins