mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -79,7 +79,7 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
|
||||
// Insert a post and make sure the ID is OK.
|
||||
$id = wp_insert_post( $post );
|
||||
$this->assertTrue( is_numeric( $id ) );
|
||||
$this->assertIsNumeric( $id );
|
||||
$this->assertTrue( $id > 0 );
|
||||
|
||||
// Fetch the post and make sure it matches.
|
||||
@@ -135,7 +135,7 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
// dmp( _get_cron_array() );
|
||||
$this->assertTrue( is_numeric( $id ) );
|
||||
$this->assertIsNumeric( $id );
|
||||
$this->assertTrue( $id > 0 );
|
||||
|
||||
// Fetch the post and make sure it matches.
|
||||
@@ -258,7 +258,7 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
// dmp( _get_cron_array() );
|
||||
$this->assertTrue( is_numeric( $id ) );
|
||||
$this->assertIsNumeric( $id );
|
||||
$this->assertTrue( $id > 0 );
|
||||
|
||||
// Fetch the post and make sure it matches.
|
||||
@@ -379,7 +379,7 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
// dmp( _get_cron_array() );
|
||||
$this->assertTrue( is_numeric( $id ) );
|
||||
$this->assertIsNumeric( $id );
|
||||
$this->assertTrue( $id > 0 );
|
||||
|
||||
// Fetch the post and make sure it matches.
|
||||
|
||||
Reference in New Issue
Block a user