WordPress.org

Make WordPress Core


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

    r48937 r51367  
    3030        // Validate length is 1 + created due to uncategorized.
    3131        $cat_ids = get_all_category_ids();
    32         $this->assertSame( 3, count( $cat_ids ) );
     32        $this->assertCount( 3, $cat_ids );
    3333    }
    3434
Note: See TracChangeset for help on using the changeset viewer.