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-block-type-controller.php

    r50527 r51367  
    342342        $this->assertSame( $block_type, $data['name'] );
    343343        $this->assertArrayHasKey( 'variations', $data );
    344         $this->assertSame( 1, count( $data['variations'] ) );
     344        $this->assertCount( 1, $data['variations'] );
    345345        $variation = $data['variations'][0];
    346346        $this->assertSame( 'variation title', $variation['title'] );
Note: See TracChangeset for help on using the changeset viewer.