The external-http tests are very slow, and `Wp_Http` functionality is fairly
isolated, so the benefits of skipping these tests by default outweigh the
risks.
A `grunt phpunit:external-http` subtask has been added, to ensure that the
tests are executed during exhaustive runs of the test suite, such as in
continuous integration.
Fixes#30304.
Built from https://develop.svn.wordpress.org/trunk@30298
git-svn-id: http://core.svn.wordpress.org/trunk@30297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Use the page visibility API (when available) and document.hasFocus() instead of window.onfocus/onblur. Improves speeding up/slowing down the interval and works for iframes by default.
- Add a setting for minimal interval. Maximum value is 10 min. This overrides all other intervals and cannot be changed after setting it at initialization. Can be used to reduce the frequency of requests on hosts that have low limits for used CPU time, etc.
- Extend the setting of interval to support 120 sec. (60 sec, is still the default).
- Always suspend after one hour of keyboard/mouse/touch inactivity.
Fixes#29779.
Built from https://develop.svn.wordpress.org/trunk@30293
git-svn-id: http://core.svn.wordpress.org/trunk@30292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the `ms_files_rewriting` flag is enabled, `ms_upload_constants()` is required to properly set upload directory constants. Once this fires, it is impossible to clean up for a non `ms_files_rewriting` test by turning the option back off.
Excluding these tests by default offer a more consistent environment overall. Any tests written for uploaded files in multisite should ideally have a correspondign test in this area.
This commit also moves existing `ms_files_rewriting` tests for `test_switch_upload_dir()`.
Fixes#30256
Built from https://develop.svn.wordpress.org/trunk@30286
git-svn-id: http://core.svn.wordpress.org/trunk@30286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Variables in DocBlocks should be backtick-escaped
* Parameter and return types should be as specific as possible
* `@param` types and variables should align with each other, but not intentionally with the `@return` description
See #30230.
Built from https://develop.svn.wordpress.org/trunk@30284
git-svn-id: http://core.svn.wordpress.org/trunk@30284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sharing these fixtures results in a speed improvement of almost one minute per
run of the test suite.
My hope is that future WordPress developers will spend this extra minute with
their loved ones, for life on this earth is short, my friends, and the moments
you spend watching WP generate test data can never again be reclaimed from the
grizzled clutches of Time, and none of us are really getting younger, I mean,
geez, have you looked in the mirror lately, Gandalf?
See #30017.
Built from https://develop.svn.wordpress.org/trunk@30277
git-svn-id: http://core.svn.wordpress.org/trunk@30277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Most of our unit tests that involve permalinks expect non-pretty permalinks;
this is the default setting for WP. However, when the test suite installs
multisite, `populate_network()` is run before WP recogizes itself as multisite,
which leads to pretty permalinks being set. This breaks a number of unit
tests in ways that are difficult to trace.
Built from https://develop.svn.wordpress.org/trunk@30267
git-svn-id: http://core.svn.wordpress.org/trunk@30267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This forcing appears to have been introduced to save unnecessary queries, but
(a) in some cases it appeared to be causing *more* queries, and (b) it caused
incorrect results when the 'exclude_tree' param of `get_terms()` called
`get_terms()` on each item in the tree using the 'child_of' param.
Fixes#30275.
Built from https://develop.svn.wordpress.org/trunk@30265
git-svn-id: http://core.svn.wordpress.org/trunk@30265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Our call to `$wp_roles->_init()` relied on the `__call()` method in `WP_Roles` to handle the link to the protected method. This works back to PHP 5.2.9, when a bug was fixed allowing access to protected methods through this exact approach.
`install_blog()` needs a fresh `$wp_roles` object after `populate_roles()` resets everything in its path. We can create this new object from scratch, effectively doing the same thing with the call to `_init()` via the constructor.
Fixes#29692 for trunk.
Built from https://develop.svn.wordpress.org/trunk@30242
git-svn-id: http://core.svn.wordpress.org/trunk@30242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When updating an existing taxonomy term that shares its `term_id` with
another term, we generate a new row in `wp_terms` and associate the updated
term_taxonomy_id with the new term. This separates the terms, such that
updating the name of one term does not change the name of any others.
Note that this term splitting only occurs on installations whose database
schemas have been upgraded to version 30133 or higher. Note also that shared
terms are only split when run through `wp_update_term()`, as on edit-tags.php;
we will wait until a future release of WordPress to force the splitting of all
shared taxonomy terms.
Props boonebgorges, rmccue, greuben, garyc40, wonderboymusic, imath, jesin.
Fixes#5809.
Built from https://develop.svn.wordpress.org/trunk@30241
git-svn-id: http://core.svn.wordpress.org/trunk@30241 1a063a9b-81f0-0310-95a4-ce76da25c4cd