- Timestamp:
- 05/10/2017 04:31:28 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php
r40063 r40601 336 336 } 337 337 338 public function test_get_item_sets_up_postdata() { 339 wp_set_current_user( self::$editor_id ); 340 $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 ); 341 $this->server->dispatch( $request ); 342 343 $post = get_post(); 344 $parent_post_id = wp_is_post_revision( $post->ID ); 345 346 $this->assertEquals( $post->ID, $this->revision_id1 ); 347 $this->assertEquals( $parent_post_id, self::$post_id ); 348 } 349 338 350 }
Note: See TracChangeset
for help on using the changeset viewer.