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/includes/abstract-testcase.php

    r51135 r51335  
    761761     */
    762762    public function assertNonEmptyMultidimensionalArray( $array ) {
    763         $this->assertTrue( is_array( $array ) );
     763        $this->assertIsArray( $array );
    764764        $this->assertNotEmpty( $array );
    765765
    766766        foreach ( $array as $sub_array ) {
    767             $this->assertTrue( is_array( $sub_array ) );
     767            $this->assertIsArray( $sub_array );
    768768            $this->assertNotEmpty( $sub_array );
    769769        }
Note: See TracChangeset for help on using the changeset viewer.