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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51438 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-07-15 14:44:22 +00:00
parent cc5e3f7811
commit 56a90eb273
9 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -1214,7 +1214,7 @@ class Tests_WP_Customize_Manager extends WP_UnitTestCase {
$this->assertSame( $manager->changeset_uuid(), get_post( $post_id )->post_name, 'Expected that the "__trashed" suffix to not be added.' );
wp_set_current_user( self::$admin_user_id );
$this->assertSame( 'publish', get_post_meta( $post_id, '_wp_trash_meta_status', true ) );
$this->assertTrue( is_numeric( get_post_meta( $post_id, '_wp_trash_meta_time', true ) ) );
$this->assertIsNumeric( get_post_meta( $post_id, '_wp_trash_meta_time', true ) );
foreach ( array_keys( $expected_actions ) as $action_name ) {
$this->assertSame( $expected_actions[ $action_name ] + $action_counts[ $action_name ], did_action( $action_name ), "Action: $action_name" );