WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/06/2021 12:25:53 PM (4 months 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/term/getTheTerms.php

    r51331 r51335  
    249249        wp_defer_term_counting( false );
    250250
    251         $this->assertTrue( is_array( $terms ) );
     251        $this->assertIsArray( $terms );
    252252        $this->assertSame( array( $term_id ), wp_list_pluck( $terms, 'term_id' ) );
    253253    }
     
    284284        wp_defer_term_counting( false );
    285285
    286         $this->assertTrue( is_array( $terms ) );
     286        $this->assertIsArray( $terms );
    287287        $this->assertSame( array( $term_ids[1] ), wp_list_pluck( $terms, 'term_id' ) );
    288288    }
Note: See TracChangeset for help on using the changeset viewer.