You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/WPLoader.md
+45-47
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,10 @@ When used in this mode, the module supports the following configuration paramete
48
48
`WP_PLUGIN_DIR` constant.
49
49
*`plugins` - a list of plugins to activate and load in the WordPress installation. Each plugin must be specified in a
50
50
format like `hello.php` or `my-plugin/my-plugin.php` format.
51
-
*`silentlyActivatePlugins` - a list of plugins to activate **silently**, without firing their activation hooks. Depending on the plugin, a silent activation might cause the plugin to not work correctly. The list must be in the same format as the `plugins` parameter and plugin should be activated silently only if they are not working correctly during normal activation and are known to work correctly when activated silently.
51
+
*`silentlyActivatePlugins` - a list of plugins to activate **silently**, without firing their activation hooks.
52
+
Depending on the plugin, a silent activation might cause the plugin to not work correctly. The list must be in the
53
+
same format as the `plugins` parameter and plugin should be activated silently only if they are not working correctly
54
+
during normal activation and are known to work correctly when activated silently.
52
55
*`bootstrapActions` - a list of actions or callables to call **after** WordPress is loaded and before the tests run.
53
56
*`theme` - the theme to activate and load in the WordPress installation. The theme must be specified in slug format
54
57
like
@@ -83,11 +86,29 @@ When used in this mode, the module supports the following configuration paramete
83
86
*`WP_HTTP_BLOCK_EXTERNAL` - the `WP_HTTP_BLOCK_EXTERNAL` constant value to use when loading WordPress. If
84
87
the `wpRootFolder` path points at a configured installation, containing the `wp-config.php` file, then the value of
85
88
the constant in the configuration file will be used, else it will be randomly generated.
86
-
*`backupGlobals` - a boolean value to indicate if the global environment should be backed up before each test. Defaults to `true`. The globals' backup involves serialization of the global state, plugins or themes that define classes developed to prevent serialization of the global state will cause the tests to fail. Set this parameter to `false` to disable the global environment backup, or use a more refined approach setting the `backupGlobalsExcludeList` parameter below. Note that a test case that is explicitly setting the `backupGlobals` property will override this configuration parameter.
87
-
*`backupGlobalsExcludeList` - a list of global variables to exclude from the global environment backup. The list must be in the form of array, and it will be merged to the list of globals excluded by default.
88
-
*`backupStaticAttributes` - a boolean value to indicate if static attributes of classes should be backed up before each test. Defaults to `true`. The static attributes' backup involves serialization of the global state, plugins or themes that define classes developed to prevent serialization of the global state will cause the tests to fail. Set this parameter to `false` to disable the static attributes backup, or use a more refined approanch setting the `backupStaticAttributesExcludeList` parameter below. Note that a test case that is explicitly setting the `backupStaticAttributes` property will override this configuration parameter.
89
-
*`backupStaticAttributesExcludeList` - a list of classes to exclude from the static attributes backup. The list must be in the form of map from class names to the array of method names to exclude from the backup. See an example below.
90
-
*`skipInstall` - a boolean value to indicate if the WordPress installation should be skipped between runs, when already installed. Defaults to `false`. During boot, the `WPLoader` module will re-install WordPress and activate, on top of the fresh installation, any plugin and theme specified in the `plugins` and `theme` configuration parameters: this can be a time-consuming operation. Set this parameter to `true` to run the WordPress installation once and just load it on the following runs. To force the installation to run again, rerun the suite using the WPLoader module using the `--debug` flag or delete the `_wploader-state.sql` file in the suite directory. This configuration parameter is ignored when the `loadOnly` parameter is set to `true`.
89
+
*`backupGlobals` - a boolean value to indicate if the global environment should be backed up before each test. Defaults
90
+
to `true`. The globals' backup involves serialization of the global state, plugins or themes that define classes
91
+
developed to prevent serialization of the global state will cause the tests to fail. Set this parameter to `false` to
92
+
disable the global environment backup, or use a more refined approach setting the `backupGlobalsExcludeList` parameter
93
+
below. Note that a test case that is explicitly setting the `backupGlobals` property will override this configuration
94
+
parameter.
95
+
*`backupGlobalsExcludeList` - a list of global variables to exclude from the global environment backup. The list must
96
+
be in the form of array, and it will be merged to the list of globals excluded by default.
97
+
*`backupStaticAttributes` - a boolean value to indicate if static attributes of classes should be backed up before each
98
+
test. Defaults to `true`. The static attributes' backup involves serialization of the global state, plugins or themes
99
+
that define classes developed to prevent serialization of the global state will cause the tests to fail. Set this
100
+
parameter to `false` to disable the static attributes backup, or use a more refined approanch setting
101
+
the `backupStaticAttributesExcludeList` parameter below. Note that a test case that is explicitly setting
102
+
the `backupStaticAttributes` property will override this configuration parameter.
103
+
*`backupStaticAttributesExcludeList` - a list of classes to exclude from the static attributes backup. The list must be
104
+
in the form of map from class names to the array of method names to exclude from the backup. See an example below.
105
+
*`skipInstall` - a boolean value to indicate if the WordPress installation should be skipped between runs, when already
106
+
installed. Defaults to `false`. During boot, the `WPLoader` module will re-install WordPress and activate, on top of
107
+
the fresh installation, any plugin and theme specified in the `plugins` and `theme` configuration parameters: this can
108
+
be a time-consuming operation. Set this parameter to `true` to run the WordPress installation once and just load it on
109
+
the following runs. To force the installation to run again, rerun the suite using the WPLoader module using
110
+
the `--debug` flag or delete the `_wploader-state.sql` file in the suite directory. This configuration parameter is
111
+
ignored when the `loadOnly` parameter is set to `true`.
91
112
92
113
This is an example of an integration suite configured to use the module:
93
114
@@ -159,7 +180,8 @@ modules:
159
180
theme: twentytwentythree
160
181
```
161
182
162
-
The follow example configuration prevents the backup of globals and static attributes in all the tests of the suite that are not explicitly overriding the `backupGlobals` and `backupStaticAttributes` properties:
183
+
The follow example configuration prevents the backup of globals and static attributes in all the tests of the suite that
184
+
are not explicitly overriding the `backupGlobals` and `backupStaticAttributes` properties:
0 commit comments