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/bookmark/getBookmarks.php

    r51139 r51454  
    5656
    5757        $this->assertEqualSets( $bookmarks, wp_list_pluck( $found2, 'link_id' ) );
    58         $this->assertTrue( $num_queries < $wpdb->num_queries );
     58        $this->assertGreaterThan( $num_queries, $wpdb->num_queries );
    5959    }
    6060
     
    8383        // Equal sets != same order.
    8484        $this->assertEqualSets( $found1, $found2 );
    85         $this->assertTrue( $num_queries < $wpdb->num_queries );
     85        $this->assertGreaterThan( $num_queries, $wpdb->num_queries );
    8686    }
    8787
Note: See TracChangeset for help on using the changeset viewer.