[wp-trac] [WordPress Trac] #27884: Unit testing Multisite's bootstrap
WordPress Trac
noreply at wordpress.org
Wed Apr 23 17:14:39 UTC 2014
#27884: Unit testing Multisite's bootstrap
----------------------------+-----------------------------
Reporter: jeremyfelt | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: | Focuses: multisite
----------------------------+-----------------------------
Changes (by jeremyfelt):
* milestone: Awaiting Review => Future Release
Comment:
Ok. [https://core.trac.wordpress.org/attachment/ticket/27884/27884.diff
27884.diff] goes all in.
* Introduces `wp_network_is_defined()`, which applies a
`network_is_defined` filter so that we can specify whether to use
`DOMAIN_CURRENT_SITE`, etc...
* Introduces `wp_get_defined_network()`, which applies a
`get_defined_network` filter so that we no longer need to rely on
constants to predefine the network being loaded.
* Moves the include of `ms-load.php`, `ms-default-constants.php`, and
`sunrise.php` to `wp-settings.php` so that we can include `ms-
settings.php` repeatedly while testing.
* Removes the definition of network constants in the test bootstrap.
* Adds basic multisite bootstrap tests for some easy scenarios.
* Makes use of the new filters while testing so that we can modify the
load "constants".
This feels nicer than I expected.
No guarantee on the full MS tests passing, there seems to be a failure of
a different type with terms right now. If you run with just the 27884
group, it works fine.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27884#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list