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/import/parser.php

    r49033 r51335  
    5959            $result  = $parser->parse( $file );
    6060
    61             $this->assertTrue( is_array( $result ), $message );
     61            $this->assertIsArray( $result, $message );
    6262            $this->assertSame( 'http://localhost/', $result['base_url'], $message );
    6363            $this->assertEquals(
     
    152152            $result  = $parser->parse( $file );
    153153
    154             $this->assertTrue( is_array( $result ), $message );
     154            $this->assertIsArray( $result, $message );
    155155            $this->assertSame( 'http://localhost/', $result['base_url'], $message );
    156156            $this->assertSame( $result['categories'][0]['category_nicename'], 'alpha', $message );
Note: See TracChangeset for help on using the changeset viewer.