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/rest-api/rest-post-types-controller.php

    r48939 r51367  
    145145        $data       = $response->get_data();
    146146        $properties = $data['schema']['properties'];
    147         $this->assertSame( 10, count( $properties ) );
     147        $this->assertCount( 10, $properties );
    148148        $this->assertArrayHasKey( 'capabilities', $properties );
    149149        $this->assertArrayHasKey( 'description', $properties );
Note: See TracChangeset for help on using the changeset viewer.