Make WordPress Core


Ignore:
Timestamp:
03/23/2022 04:26:01 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use a more descriptive name for the sticky posts test that verifies the parameters from the main query.

Reorder the parameters of the get_posts() call for consistency with similar calls elsewhere.

Follow-up to [52982].

See #36907.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/stickies.php

    r52982 r52985  
    110110         * @ticket 36907
    111111         */
    112         public function test_stickies_nest_query() {
     112        public function test_stickies_should_obey_parameters_from_the_main_query() {
    113113                $filter = new MockAction();
    114114                add_filter( 'posts_pre_query', array( $filter, 'filter' ), 10, 2 );
    … …  
    120120                $this->assertNotEmpty( $sticky_query_vars['posts_per_page'] );
    121121                $this->assertSame( $query_vars['suppress_filters'], $sticky_query_vars['suppress_filters'] );
     122                $this->assertSame( $query_vars['cache_results'], $sticky_query_vars['cache_results'] );
    122123                $this->assertSame( $query_vars['update_post_meta_cache'], $sticky_query_vars['update_post_meta_cache'] );
    123124                $this->assertSame( $query_vars['update_post_term_cache'], $sticky_query_vars['update_post_term_cache'] );
    124125                $this->assertSame( $query_vars['lazy_load_term_meta'], $sticky_query_vars['lazy_load_term_meta'] );
    125                 $this->assertSame( $query_vars['cache_results'], $sticky_query_vars['cache_results'] );
    126126                $this->assertTrue( $sticky_query_vars['ignore_sticky_posts'] );
    127127                $this->assertTrue( $sticky_query_vars['no_found_rows'] );
Note: See TracChangeset for help on using the changeset viewer.