Make WordPress Core


Ignore:
Timestamp:
07/15/2021 09:06:20 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_a( ... ) ) with assertInstanceOf() to use native PHPUnit functionality.

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

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/taxonomy.php

    r51397 r51436  
    439439            'cat_name' => 'Error',
    440440        );
    441         $this->assertTrue( is_a( wp_insert_category( $cat, true ), 'WP_Error' ) );
     441        $this->assertInstanceOf( 'WP_Error', wp_insert_category( $cat, true ) );
    442442    }
    443443
Note: See TracChangeset for help on using the changeset viewer.