Make WordPress Core


Ignore:
Timestamp:
07/15/2021 02:44:22 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_numeric( ... ) ) with assertIsNumeric() to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436].

See #53363.

File:
1 edited

Legend:

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

    r48937 r51438  
    6868        // Insert a post and make sure the ID is OK.
    6969        $post_id = wp_insert_post( $post );
    70         $this->assertTrue( is_numeric( $post_id ) );
     70        $this->assertIsNumeric( $post_id );
    7171        $this->assertTrue( $post_id > 0 );
    7272
     
    8484        // Insert a post and make sure the ID is OK.
    8585        $nav_id = wp_insert_post( $post );
    86         $this->assertTrue( is_numeric( $nav_id ) );
     86        $this->assertIsNumeric( $nav_id );
    8787        $this->assertTrue( $nav_id > 0 );
    8888
Note: See TracChangeset for help on using the changeset viewer.