Don't run wp_get_archives()
cache test on multisite.
The introduction of a Customizer test that creates a new blog [31707] causes `WP_INSTALLING` to be set by the time the `wp_get_archives()` tests run. This, in turn, causes the query counts to vary in unpredictable ways. See #31130. git-svn-id: https://develop.svn.wordpress.org/trunk@31764 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4179e355e0
commit
13e66393f1
@ -16,6 +16,10 @@ class Tests_General_Archives extends WP_UnitTestCase {
|
|||||||
function test_get_archives_cache() {
|
function test_get_archives_cache() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
$this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING, which causes cache misses.' );
|
||||||
|
}
|
||||||
|
|
||||||
$this->factory->post->create_many( 15, array( 'post_type' => 'post' ) );
|
$this->factory->post->create_many( 15, array( 'post_type' => 'post' ) );
|
||||||
wp_cache_delete( 'last_changed', 'posts' );
|
wp_cache_delete( 'last_changed', 'posts' );
|
||||||
$this->assertFalse( wp_cache_get( 'last_changed', 'posts' ) );
|
$this->assertFalse( wp_cache_get( 'last_changed', 'posts' ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user