Make WordPress Core

Changeset 59116


Ignore:
Timestamp:
09/30/2024 01:29:32 AM (2 years ago)
Author:
peterwilsoncc
Message:

Build/Test Tools: Re-order assertion parameters query block tests.

Corrects the order of the expected and actual values in several tests of the build_query_vars_from_query_block() function.

See #61530.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/wpBlock.php

    r59115 r59116  
    441441
    442442                $this->assertSame(
    443                         $query,
    444443                        array(
    445444                                'post_type'       => 'page',
     
    460459                                ),
    461460                                'post_parent__in' => array( 1, 2 ),
    462                         )
     461                        ),
     462                        $query
    463463                );
    464464        }
     
    604604
    605605                $this->assertSame(
    606                         $query,
    607606                        array(
    608607                                'post_type'    => 'post',
     
    611610                                'post__not_in' => array(),
    612611                                'tax_query'    => array(),
    613                         )
     612                        ),
     613                        $query
    614614                );
    615615        }
     
    636636
    637637                $this->assertSame(
    638                         $query,
    639638                        array(
    640639                                'post_type'      => 'post',
     
    645644                                'offset'         => 0,
    646645                                'posts_per_page' => 2,
    647                         )
     646                        ),
     647                        $query
    648648                );
    649649        }
     
    669669                $query         = build_query_vars_from_query_block( $block, 3 );
    670670                $this->assertSame(
    671                         $query,
    672671                        array(
    673672                                'post_type'      => 'post',
     
    678677                                'offset'         => 10,
    679678                                'posts_per_page' => 5,
    680                         )
     679                        ),
     680                        $query
    681681                );
    682682        }
     
    702702                $query         = build_query_vars_from_query_block( $block, 3 );
    703703                $this->assertSame(
    704                         $query,
    705704                        array(
    706705                                'post_type'      => 'post',
     
    711710                                'offset'         => 12,
    712711                                'posts_per_page' => 5,
    713                         )
     712                        ),
     713                        $query
    714714                );
    715715        }
     
    746746                $query = build_query_vars_from_query_block( $block, 1 );
    747747                $this->assertSame(
    748                         $query,
    749748                        array(
    750749                                'post_type'    => 'book',
     
    753752                                'post__not_in' => array(),
    754753                                'tax_query'    => array(),
    755                         )
     754                        ),
     755                        $query
    756756                );
    757757        }
Note: See TracChangeset for help on using the changeset viewer.