Make WordPress Core


Ignore:
Timestamp:
07/18/2021 02:10:24 PM (3 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/multisite/network.php

    r51331 r51454  
    452452            $user_count = (int) get_user_count();
    453453
    454             $this->assertTrue( $site_count > 0 && $user_count > 0 );
     454            $this->assertGreaterThan( 0, $site_count );
     455            $this->assertGreaterThan( 0, $user_count );
    455456        }
    456457
     
    467468            $user_count = (int) get_user_count( self::$different_network_id );
    468469
    469             $this->assertTrue( $site_count > 0 && $user_count > 0 );
     470            $this->assertGreaterThan( 0, $site_count );
     471            $this->assertGreaterThan( 0, $user_count );
    470472        }
    471473
Note: See TracChangeset for help on using the changeset viewer.