Changeset 34599 for trunk/tests/phpunit/tests/comment.php
- Timestamp:
- 09/26/2015 04:01:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment.php
r34546 r34599 340 340 $this->assertEquals( array( $c3 ), array_values( wp_list_pluck( $children[ $c2 ]->get_children(), 'comment_ID' ) ) ); 341 341 } 342 343 /** 344 * @group 27571 345 */ 346 public function test_post_properties_should_be_lazyloaded() { 347 $p = $this->factory->post->create(); 348 349 $c = $this->factory->comment->create( array( 'comment_post_ID' => $p ) ); 350 351 $post = get_post( $p ); 352 $comment = get_comment( $c ); 353 354 $post_fields = array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_content_filtered', 'post_parent', 'guid', 'menu_order', 'post_type', 'post_mime_type', 'comment_count' ); 355 356 foreach ( $post_fields as $pf ) { 357 $this->assertTrue( isset( $comment->$pf ), $pf ); 358 $this->assertSame( $post->$pf, $comment->$pf, $pf ); 359 } 360 } 342 361 }
Note: See TracChangeset
for help on using the changeset viewer.