Changeset 50935 for trunk/tests/phpunit/tests/post/objects.php
- Timestamp:
- 05/19/2021 10:10:58 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/objects.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/objects.php
r48937 r50935 185 185 } 186 186 187 /** 188 * @ticket 53235 189 */ 190 public function test_numeric_properties_should_be_cast_to_ints() { 191 $post_id = self::factory()->post->create(); 192 $contexts = array( 'raw', 'edit', 'db', 'display', 'attribute', 'js' ); 193 194 foreach ( $contexts as $context ) { 195 $post = get_post( $post_id, OBJECT, $context ); 196 197 $this->assertInternalType( 'int', $post->ID ); 198 $this->assertInternalType( 'int', $post->post_parent ); 199 $this->assertInternalType( 'int', $post->menu_order ); 200 } 201 } 202 187 203 function test_get_post_identity() { 188 204 $post = get_post( self::factory()->post->create() );
Note: See TracChangeset
for help on using the changeset viewer.