Make WordPress Core


Ignore:
Timestamp:
07/02/2014 07:56:50 PM (10 years ago)
Author:
wonderboymusic
Message:

This test in post/revisions.php is too misleading and doesn't work as expected since multiple queries can occur before the one that is intended for testing.

See #28706.

File:
1 edited

Legend:

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

    r28543 r28962  
    343343     * @ticket 26042
    344344     */
    345     function test_wp_get_posts_revisions_sql() {
    346         $post = get_default_post_to_edit( 'post', true );
    347 
    348         add_filter( 'query', array( $this, '_filter_query' ) );
    349 
    350         wp_get_post_revisions( $post->ID );
    351     }
    352 
    353     function _filter_query( $sql ) {
    354         remove_filter( 'query', array( $this, '_filter_query' ) );
    355         global $wpdb;
    356         $this->assertContains( "ORDER BY $wpdb->posts.post_date DESC, $wpdb->posts.ID DESC", $sql );
    357         return $sql;
    358     }
    359 
    360     /**
    361      * @ticket 26042
    362      */
    363345    function test_revision_order() {
    364346        $ok = 0;
Note: See TracChangeset for help on using the changeset viewer.