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/meta.php

    r51367 r51454  
    345345        $negative_mid = $this->meta_id * -1;
    346346
    347         $this->assertTrue( $negative_mid < 0 );
     347        $this->assertLessThan( 0, $negative_mid );
    348348        $this->assertFalse( get_metadata_by_mid( 'user', $negative_mid ) );
    349349        $this->assertFalse( update_metadata_by_mid( 'user', $negative_mid, 'meta_new_value' ) );
Note: See TracChangeset for help on using the changeset viewer.