Make WordPress Core


Ignore:
Timestamp:
07/07/2021 10:32:56 AM (4 years 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/cache.php

    r50926 r51367  
    8484
    8585            $terms = get_terms( $tax, array( 'hide_empty' => false ) );
    86             $this->assertSame( $i, count( $terms ) );
     86            $this->assertCount( $i, $terms );
    8787            if ( $i > 1 ) {
    8888                $hierarchy = _get_term_hierarchy( $tax );
Note: See TracChangeset for help on using the changeset viewer.