Make WordPress Core


Ignore:
Timestamp:
07/16/2021 09:50:47 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_string( ... ) ) with assertIsString() to use native PHPUnit functionality.

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

See #53363.

File:
1 edited

Legend:

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

    r51438 r51448  
    10451045        $date_return = mysql_to_rfc3339( $actual );
    10461046
    1047         $this->assertTrue( is_string( $date_return ), 'The date return must be a string' );
     1047        $this->assertIsString( $date_return, 'The date return must be a string' );
    10481048        $this->assertNotEmpty( $date_return, 'The date return could not be an empty string' );
    10491049        $this->assertSame( $expected, $date_return, 'The date does not match' );
Note: See TracChangeset for help on using the changeset viewer.