Make WordPress Core

Changeset 32997


Ignore:
Timestamp:
06/29/2015 02:31:52 PM (9 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/getPostClass.php

    r31979 r32997  
    125125        $found = get_post_class( '', $this->post_id );
    126126
    127         $this->assertSame( $num_queries, $wpdb->num_queries );
     127        // The 'site_icon' option check adds a query during unit tests. See {@see WP_Site_Icon::get_post_metadata()}.
     128        $expected_num_queries = $num_queries + 1;
     129
     130        $this->assertSame( $expected_num_queries, $wpdb->num_queries );
    128131    }
    129132}
Note: See TracChangeset for help on using the changeset viewer.