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/term/query.php

    r48939 r51367  
    289289        );
    290290
    291         $this->assertSame( 1, count( $query->terms ) );
     291        $this->assertCount( 1, $query->terms );
    292292        $this->assertSame( $t, reset( $query->terms )->term_id );
    293293    }
     
    313313        );
    314314
    315         $this->assertSame( 2, count( $query->terms ) );
     315        $this->assertCount( 2, $query->terms );
    316316        foreach ( $query->terms as $term ) {
    317317            $this->assertSame( $t, $term->term_id );
Note: See TracChangeset for help on using the changeset viewer.