- Timestamp:
- 11/30/2016 03:02:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
r39353 r39371 1647 1647 $this->assertEquals( $params['content'], $post->post_content ); 1648 1648 $this->assertEquals( $params['excerpt'], $post->post_excerpt ); 1649 } 1650 1651 public function test_update_item_no_change() { 1652 wp_set_current_user( self::$editor_id ); 1653 $post = get_post( self::$post_id ); 1654 1655 $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/posts/%d', self::$post_id ) ); 1656 $request->set_param( 'author', $post->post_author ); 1657 1658 // Run twice to make sure that the update still succeeds even if no DB 1659 // rows are updated. 1660 $response = $this->server->dispatch( $request ); 1661 $this->check_update_post_response( $response ); 1662 1663 $response = $this->server->dispatch( $request ); 1664 $this->check_update_post_response( $response ); 1649 1665 } 1650 1666
Note: See TracChangeset
for help on using the changeset viewer.