WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/07/2021 10:32:56 AM (3 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertSame( [number], count( ... ) ) with assertCount() to use native PHPUnit functionality.

Follow-up to [51335], [51337].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/CustomizeMenus.php

    r49696 r51367  
    580580        if ( isset( $post_args['search'] ) && 'test' === $post_args['search'] ) {
    581581            $this->assertTrue( $response['success'] );
    582             $this->assertSame( 6, count( $response['data']['items'] ) );
     582            $this->assertCount( 6, $response['data']['items'] );
    583583            $item_ids = wp_list_pluck( $response['data']['items'], 'id' );
    584584            $this->assertContains( 'post-' . $included_auto_draft_post->ID, $item_ids );
Note: See TracChangeset for help on using the changeset viewer.