Make WordPress Core


Ignore:
Timestamp:
09/29/2023 03:22:12 PM (9 months ago)
Author:
jorbin
Message:

Tests: Reduce usage of assertEquals

Replaces assertSame with assertCount in a number of tests.

Props ayeshrajans, jorbin.
See #58956.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php

    r56547 r56746  
    3737        $data       = $response->get_data();
    3838        $post_types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
    39         $this->assertSame( count( $post_types ), count( $data ) );
     39        $this->assertCount( count( $post_types ), $data );
    4040        $this->assertSame( $post_types['post']->name, $data['post']['slug'] );
    4141        $this->check_post_type_obj( 'view', $post_types['post'], $data['post'], $data['post']['_links'] );
Note: See TracChangeset for help on using the changeset viewer.