WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/06/2021 12:31:19 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_object( ... ) ) with assertIsObject() to use native PHPUnit functionality.

Follow-up to [51331], [51335].

See #53363.

File:
1 edited

Legend:

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

    r51335 r51337  
    2828            $tax = get_taxonomy( $taxonomy );
    2929            // Should return an object with the correct taxonomy object type.
    30             $this->assertTrue( is_object( $tax ) );
     30            $this->assertIsObject( $tax );
    3131            $this->assertIsArray( $tax->object_type );
    3232            $this->assertSame( array( 'post' ), $tax->object_type );
     
    110110            $tax = get_taxonomy( $taxonomy );
    111111            // Should return an object with the correct taxonomy object type.
    112             $this->assertTrue( is_object( $tax ) );
     112            $this->assertIsObject( $tax );
    113113            $this->assertIsArray( $tax->object_type );
    114114            $this->assertSame( array( 'link' ), $tax->object_type );
Note: See TracChangeset for help on using the changeset viewer.