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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51448 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-07-16 09:50:47 +00:00
parent a74568e96d
commit bec8574024

View File

@ -1044,7 +1044,7 @@ class Tests_Functions extends WP_UnitTestCase {
function test_mysql_to_rfc3339( $expected, $actual ) {
$date_return = mysql_to_rfc3339( $actual );
$this->assertTrue( is_string( $date_return ), 'The date return must be a string' );
$this->assertIsString( $date_return, 'The date return must be a string' );
$this->assertNotEmpty( $date_return, 'The date return could not be an empty string' );
$this->assertSame( $expected, $date_return, 'The date does not match' );
$this->assertEquals( new DateTime( $expected ), new DateTime( $date_return ), 'The date is not the same after the call method' );