Make WordPress Core


Ignore:
Timestamp:
07/15/2021 02:44:22 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_numeric( ... ) ) with assertIsNumeric() to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme/getThemeStarterContent.php

    r51331 r51438  
    160160        foreach ( $hydrated_starter_content['posts'] as $key => $post ) {
    161161            $this->assertIsString( $key );
    162             $this->assertFalse( is_numeric( $key ) );
     162            $this->assertIsNotNumeric( $key );
    163163            $this->assertIsArray( $post );
    164164            $this->assertArrayHasKey( 'post_type', $post );
Note: See TracChangeset for help on using the changeset viewer.