mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-05 17:00:03 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@51367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -83,7 +83,7 @@ class Tests_Term_Cache extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
$terms = get_terms( $tax, array( 'hide_empty' => false ) );
|
||||
$this->assertSame( $i, count( $terms ) );
|
||||
$this->assertCount( $i, $terms );
|
||||
if ( $i > 1 ) {
|
||||
$hierarchy = _get_term_hierarchy( $tax );
|
||||
$this->assertNotEmpty( $hierarchy );
|
||||
|
||||
Reference in New Issue
Block a user