Make WordPress Core

Changeset 53389 for branches/6.0


Ignore:
Timestamp:
05/10/2022 09:40:16 PM (4 years ago)
Author:
hellofromTonya
Message:

Editor: Use stricter assertions in comment template tests.

Backport of the remaining Comment Template block tests from Gutenberg:

  • assertEquals() replaced with assertSameSetsWithIndex().
  • assertion's argument order changed to ensure expected and then actual.

Follow-up to [53353], [53298], [53172], [53138].

Props bernhard-reiter.
Merges [53388] to the 6.0 branch.
Fixes #55708.

Location:
branches/6.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0

  • branches/6.0/tests/phpunit/tests/blocks/renderCommentTemplate.php

    r53336 r53389  
    6767                );
    6868
    69                 $this->assertEquals(
     69                $this->assertSameSetsWithIndex(
    7070                        array(
    7171                                'orderby'       => 'comment_date_gmt',
     
    124124                $block = new WP_Block( $parsed_blocks[0] );
    125125
    126                 $this->assertEquals(
     126                $this->assertSameSetsWithIndex(
    127127                        array(
    128128                                'orderby'       => 'comment_date_gmt',
     
    390390                add_filter( 'wp_get_current_commenter', $commenter_filter );
    391391
    392                 $this->assertEquals(
    393                         build_comment_query_vars_from_block( $block ),
     392                $this->assertSameSetsWithIndex(
    394393                        array(
    395394                                'orderby'            => 'comment_date_gmt',
     
    402401                                'number'             => 5,
    403402                                'paged'              => 1,
    404                         )
     403                        ),
     404                        build_comment_query_vars_from_block( $block )
    405405                );
    406406        }
Note: See TracChangeset for help on using the changeset viewer.