From bec8574024546c20154ea48a6b8fe65b24990eff Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 16 Jul 2021 09:50:47 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php index 314e6d2899..e6b8580dc8 100644 --- a/tests/phpunit/tests/functions.php +++ b/tests/phpunit/tests/functions.php @@ -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' );