Make WordPress Core


Ignore:
Timestamp:
07/06/2021 12:25:53 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_array( ... ) ) with assertIsArray() to use native PHPUnit functionality.

Follow-up to [51331].

See #53363.

File:
1 edited

Legend:

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

    r51331 r51335  
    2929                        // Should return an object with the correct taxonomy object type.
    3030                        $this->assertTrue( is_object( $tax ) );
    31                         $this->assertTrue( is_array( $tax->object_type ) );
     31                        $this->assertIsArray( $tax->object_type );
    3232                        $this->assertSame( array( 'post' ), $tax->object_type );
    3333                }
    … …  
    111111                        // Should return an object with the correct taxonomy object type.
    112112                        $this->assertTrue( is_object( $tax ) );
    113                         $this->assertTrue( is_array( $tax->object_type ) );
     113                        $this->assertIsArray( $tax->object_type );
    114114                        $this->assertSame( array( 'link' ), $tax->object_type );
    115115                }
Note: See TracChangeset for help on using the changeset viewer.