From 3a982b15906f799f46cdaa8f4ea03f097747beac Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 29 Jun 2015 14:31:52 +0000 Subject: [PATCH] Fix `Tests_Post_GetPostClass::test_taxonomy_classes_hit_cache()` after [32994]. [32994] results in an additional database query during automated testing, so the query count being compared in this specific test must be incremented manually. See #16434. git-svn-id: https://develop.svn.wordpress.org/trunk@32997 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/post/getPostClass.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/post/getPostClass.php b/tests/phpunit/tests/post/getPostClass.php index 811de43ceb..5e64e33841 100644 --- a/tests/phpunit/tests/post/getPostClass.php +++ b/tests/phpunit/tests/post/getPostClass.php @@ -124,6 +124,9 @@ class Tests_Post_GetPostClass extends WP_UnitTestCase { $found = get_post_class( '', $this->post_id ); - $this->assertSame( $num_queries, $wpdb->num_queries ); + // The 'site_icon' option check adds a query during unit tests. See {@see WP_Site_Icon::get_post_metadata()}. + $expected_num_queries = $num_queries + 1; + + $this->assertSame( $expected_num_queries, $wpdb->num_queries ); } }