Changeset 42343 for trunk/tests/phpunit/tests/xmlrpc/wp/restoreRevision.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/restoreRevision.php
r40417 r42343 13 13 $this->post_id = self::factory()->post->create( array( 'post_content' => 'edit1' ) ); // Not saved as a revision 14 14 // First saved revision on update, see https://core.trac.wordpress.org/changeset/24650 15 wp_insert_post( array( 'ID' => $this->post_id, 'post_content' => 'edit2' ) ); 15 wp_insert_post( 16 array( 17 'ID' => $this->post_id, 18 'post_content' => 'edit2', 19 ) 20 ); 16 21 17 22 $revisions = wp_get_post_revisions( $this->post_id ); 18 23 //$revision = array_shift( $revisions ); // First revision is empty - https://core.trac.wordpress.org/changeset/23842 19 24 // First revision is NOT empty, see https://core.trac.wordpress.org/changeset/24650 20 $revision = array_shift( $revisions );25 $revision = array_shift( $revisions ); 21 26 $this->revision_id = $revision->ID; 22 27 }
Note: See TracChangeset
for help on using the changeset viewer.