Make WordPress Core


Ignore:
Timestamp:
07/18/2021 02:10:24 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( ... > 0 ) with assertGreaterThan() to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448], [51449], [51451], [51453].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/wpDeleteUser.php

    r51438 r51454  
    6969        $post_id = wp_insert_post( $post );
    7070        $this->assertIsNumeric( $post_id );
    71         $this->assertTrue( $post_id > 0 );
     71        $this->assertGreaterThan( 0, $post_id );
    7272
    7373        $post = get_post( $post_id );
     
    8585        $nav_id = wp_insert_post( $post );
    8686        $this->assertIsNumeric( $nav_id );
    87         $this->assertTrue( $nav_id > 0 );
     87        $this->assertGreaterThan( 0, $nav_id );
    8888
    8989        $post = get_post( $nav_id );
Note: See TracChangeset for help on using the changeset viewer.