Property | Type | Description | |
---|---|---|---|
$excludeActions | |||
$includeInheritedActions | |||
$onlyActions |
Property | Type | Description | |
---|---|---|---|
$config | array | All of the fields have a correspondant in the standard wp-tests-config.php file found in WordPress automated testing suite. isolatedInstall - bool, def. true, whether the WP installation should happen in an isolated process(core like) or not (previous wp-browser method). wpDebug - bool, def. true, the WP_DEBUG global value. multisite - bool, def. false, if set to true will create a multisite installation, the WP_TESTS_MULTISITE global value. dbCharset - string, def. utf8, the DB_CHARSET global value. dbCollate - string, def. , the DB_COLLATE global value. tablePrefix - string, def. wptests_, the WP_TESTS_TABLE_PREFIX value. domain - string, def. example.org, the root URL of the site, the WP_TESTS_DOMAIN global value. adminEmail - string, def. [email protected], the admin email, the WP_TEST_EMAIL global value. title - string, def. Test Blog, the blog title, the WP_TESTS_TITLE global value. phpBinary - string, def. php, the php bin command, the WP_PHP_BINARY global value. language - string, def. , the installation language, the WPLANG global value. configFile - string or array, def. , the path, or an array of paths, to custom config file(s) relative to the wpRootFolder folder, no leading slash needed; this is the place where custom wp_tests_options could be set. pluginsFolder - string, def. , the relative path to the plugins folder in respect to the WP root folder plugins - array, def. [], a list of plugins that should be loaded before any test case runs and after mu-plugins have been loaded; these should be defined in the folder/plugin-file.php format. activatePlugins - array, def. [], a list of plugins that should be activated calling the activate_{$plugin} before any test case runs and after mu-plugins have been loaded; these should be defined in the folder/plugin-file.php format. bootstrapActions - array, def. [], a list of actions that should be called after before any test case runs. | |
$pluginsFolder | The absolute path to the plugins folder | ||
$requiredFields | array | wpRootFolder - the absolute path to the root folder of the WordPress installation to use for testing, the ABSPATH global value. dbNAme - the name of the database to use for the tests, will be trashed during tests so take care, will be the DB_NAME global. dbHost - the host the database can be found at, will be the DB_HOST global. dbUser - the database privileged user, should GRANT ALL on the database, will be the DB_USER global. dbPassword - the password for the user, will be the DB_PASSWORD global. | |
$wpBootstrapFile | string | The path to the modified tests bootstrap file. | |
$wpRootFolder | The absolute path to WP root folder (ABSPATH). |
Method | Description | |
---|---|---|
__construct ( Codeception\Lib\ModuleContainer $moduleContainer, $config, tad\WPBrowser\Adapters\WP $wp = null ) | ||
_initialize ( ) : void | The function that will initialize the module. | |
_setActiveTheme ( ) | Sets the active template and stylesheet according to the theme configuration parameter. | |
_switch_theme ( ) | ||
activatePlugins ( ) | ||
bootstrapActions ( ) | Calls a list of user-defined actions needed in tests. | |
ensureDbModuleCompat ( ) | ||
loadPlugins ( ) | Loads the plugins required by the test. |
Method | Description | |
---|---|---|
defineGlobals ( ) : void | Defines the globals needed by WordPress to run to user set values. | |
getPluginsFolder ( ) : string | ||
getWpRootFolder ( ) : string | ||
initialize ( ) | ||
loadConfigFile ( string $folder = null ) | ||
loadWordPress ( ) : void | Loads WordPress calling the bootstrap file | |
requiresIsolatedInstallation ( ) : boolean | mixed | ||
setActivePlugins ( ) |
Method | Description | |
---|---|---|
ensureWPRoot ( string $wpRootFolder ) |
public __construct ( Codeception\Lib\ModuleContainer $moduleContainer, $config, tad\WPBrowser\Adapters\WP $wp = null ) | ||
$moduleContainer | Codeception\Lib\ModuleContainer | |
$wp | tad\WPBrowser\Adapters\WP |
public _initialize ( ) : void | ||
return | void |
public _setActiveTheme ( ) |
public bootstrapActions ( ) |
protected defineGlobals ( ) : void | ||
return | void |
protected loadConfigFile ( string $folder = null ) | ||
$folder | string | = null The absolute path to the WordPress root installation folder. |
protected loadWordPress ( ) : void | ||
return | void |
protected requiresIsolatedInstallation ( ) : boolean | mixed | ||
return | boolean | mixed |
protected array $config | ||
return | array |
protected $pluginsFolder |
protected array $requiredFields | ||
return | array |
protected string $wpBootstrapFile | ||
return | string |