Changeset 51438
- Timestamp:
- 07/15/2021 02:44:22 PM (3 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/DeleteComment.php
r51404 r51438 206 206 } catch ( WPAjaxDieStopException $e ) { 207 207 $this->assertSame( 10, strlen( $e->getMessage() ) ); 208 $this->assert True( is_numeric( $e->getMessage()) );208 $this->assertIsNumeric( $e->getMessage() ); 209 209 } catch ( Exception $e ) { 210 210 $this->fail( 'Unexpected exception type: ' . get_class( $e ) ); … … 256 256 } catch ( WPAjaxDieStopException $e ) { 257 257 $this->assertSame( 10, strlen( $e->getMessage() ) ); 258 $this->assert True( is_numeric( $e->getMessage()) );258 $this->assertIsNumeric( $e->getMessage() ); 259 259 } catch ( Exception $e ) { 260 260 $this->fail( 'Unexpected exception type: ' . get_class( $e ) ); -
trunk/tests/phpunit/tests/customize/manager.php
r51415 r51438 1215 1215 wp_set_current_user( self::$admin_user_id ); 1216 1216 $this->assertSame( 'publish', get_post_meta( $post_id, '_wp_trash_meta_status', true ) ); 1217 $this->assert True( is_numeric( get_post_meta( $post_id, '_wp_trash_meta_time', true )) );1217 $this->assertIsNumeric( get_post_meta( $post_id, '_wp_trash_meta_time', true ) ); 1218 1218 1219 1219 foreach ( array_keys( $expected_actions ) as $action_name ) { -
trunk/tests/phpunit/tests/functions.php
r51331 r51438 1199 1199 $id = wp_unique_id(); 1200 1200 $this->assertIsString( $id ); 1201 $this->assert True( is_numeric( $id ));1201 $this->assertIsNumeric( $id ); 1202 1202 $ids[] = $id; 1203 1203 } -
trunk/tests/phpunit/tests/post.php
r51397 r51438 80 80 // Insert a post and make sure the ID is OK. 81 81 $id = wp_insert_post( $post ); 82 $this->assert True( is_numeric( $id ));82 $this->assertIsNumeric( $id ); 83 83 $this->assertTrue( $id > 0 ); 84 84 … … 136 136 $this->post_ids[] = $id; 137 137 // dmp( _get_cron_array() ); 138 $this->assert True( is_numeric( $id ));138 $this->assertIsNumeric( $id ); 139 139 $this->assertTrue( $id > 0 ); 140 140 … … 259 259 $this->post_ids[] = $id; 260 260 // dmp( _get_cron_array() ); 261 $this->assert True( is_numeric( $id ));261 $this->assertIsNumeric( $id ); 262 262 $this->assertTrue( $id > 0 ); 263 263 … … 380 380 $this->post_ids[] = $id; 381 381 // dmp( _get_cron_array() ); 382 $this->assert True( is_numeric( $id ));382 $this->assertIsNumeric( $id ); 383 383 $this->assertTrue( $id > 0 ); 384 384 -
trunk/tests/phpunit/tests/taxonomy.php
r51436 r51438 421 421 'cat_name' => 'test1', 422 422 ); 423 $this->assert True( is_numeric( wp_insert_category( $cat, true )) );423 $this->assertIsNumeric( wp_insert_category( $cat, true ) ); 424 424 } 425 425 -
trunk/tests/phpunit/tests/term.php
r51367 r51438 154 154 155 155 $t = wp_insert_category( array( 'cat_name' => $term ) ); 156 $this->assert True( is_numeric( $t ));156 $this->assertIsNumeric( $t ); 157 157 $this->assertNotWPError( $t ); 158 158 $this->assertTrue( $t > 0 ); -
trunk/tests/phpunit/tests/theme/getThemeStarterContent.php
r51331 r51438 160 160 foreach ( $hydrated_starter_content['posts'] as $key => $post ) { 161 161 $this->assertIsString( $key ); 162 $this->assert False( is_numeric( $key ));162 $this->assertIsNotNumeric( $key ); 163 163 $this->assertIsArray( $post ); 164 164 $this->assertArrayHasKey( 'post_type', $post ); -
trunk/tests/phpunit/tests/user.php
r51404 r51438 483 483 // Insert a post and make sure the ID is OK. 484 484 $post_id = wp_insert_post( $post ); 485 $this->assert True( is_numeric( $post_id ));485 $this->assertIsNumeric( $post_id ); 486 486 487 487 setup_postdata( get_post( $post_id ) ); -
trunk/tests/phpunit/tests/user/wpDeleteUser.php
r48937 r51438 68 68 // Insert a post and make sure the ID is OK. 69 69 $post_id = wp_insert_post( $post ); 70 $this->assert True( is_numeric( $post_id ));70 $this->assertIsNumeric( $post_id ); 71 71 $this->assertTrue( $post_id > 0 ); 72 72 … … 84 84 // Insert a post and make sure the ID is OK. 85 85 $nav_id = wp_insert_post( $post ); 86 $this->assert True( is_numeric( $nav_id ));86 $this->assertIsNumeric( $nav_id ); 87 87 $this->assertTrue( $nav_id > 0 ); 88 88
Note: See TracChangeset
for help on using the changeset viewer.