Make WordPress Core


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

    r51331 r51367  
    101101
    102102        foreach ( $found as $action => $mids ) {
    103             $this->assertSame( 2, count( $mids ) );
     103            $this->assertCount( 2, $mids );
    104104        }
    105105    }
     
    138138        );
    139139
    140         $this->assertSame( 1, count( $u ) );
     140        $this->assertCount( 1, $u );
    141141
    142142        // User found is not locally defined author (it's the admin).
Note: See TracChangeset for help on using the changeset viewer.