Do not run certain cache-hit tests on multisite.
These tests fail on multisite if run after a test that creates `wpmu_create_blog()`, because `wpmu_create_blog()` defines `WP_INSTALLING`, which results in unexpected cache misses. See [28965] for a similar fix. git-svn-id: https://develop.svn.wordpress.org/trunk@31280 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
da8f896426
commit
1eee61f31a
@ -50,6 +50,10 @@ class Tests_Post_GetPostClass extends WP_UnitTestCase {
|
||||
public function test_taxonomy_classes_hit_cache() {
|
||||
global $wpdb;
|
||||
|
||||
if ( is_multisite() ) {
|
||||
$this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING, which causes cache misses.' );
|
||||
}
|
||||
|
||||
register_taxonomy( 'wptests_tax', 'post' );
|
||||
wp_set_post_terms( $this->post_id, array( 'foo', 'bar' ), 'wptests_tax' );
|
||||
wp_set_post_terms( $this->post_id, array( 'footag', 'bartag' ), 'post_tag' );
|
||||
|
@ -382,6 +382,10 @@ class Tests_Term_getTerms extends WP_UnitTestCase {
|
||||
public function test_child_of_should_skip_query_when_specified_parent_is_not_found_in_hierarchy_cache() {
|
||||
global $wpdb;
|
||||
|
||||
if ( is_multisite() ) {
|
||||
$this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING, which causes cache misses.' );
|
||||
}
|
||||
|
||||
register_taxonomy( 'wptests_tax', 'post', array( 'hierarchical' => true, ) );
|
||||
|
||||
$terms = $this->factory->term->create_many( 3, array( 'taxonomy' => 'wptests_tax' ) );
|
||||
@ -1203,6 +1207,10 @@ class Tests_Term_getTerms extends WP_UnitTestCase {
|
||||
public function test_parent_should_skip_query_when_specified_parent_is_not_found_in_hierarchy_cache() {
|
||||
global $wpdb;
|
||||
|
||||
if ( is_multisite() ) {
|
||||
$this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING, which causes cache misses.' );
|
||||
}
|
||||
|
||||
register_taxonomy( 'wptests_tax', 'post', array( 'hierarchical' => true, ) );
|
||||
|
||||
$terms = $this->factory->term->create_many( 3, array( 'taxonomy' => 'wptests_tax' ) );
|
||||
|
Loading…
Reference in New Issue
Block a user