- Timestamp:
- 10/19/2018 01:48:42 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/tests/phpunit/tests/rest-api/rest-schema-setup.php
r43739 r43768 90 90 '/wp/v2/posts/(?P<parent>[\\d]+)/revisions', 91 91 '/wp/v2/posts/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)', 92 '/wp/v2/posts/(?P<parent>[\\d]+)/autosaves', 93 '/wp/v2/posts/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)', 92 94 '/wp/v2/pages', 93 95 '/wp/v2/pages/(?P<id>[\\d]+)', 94 96 '/wp/v2/pages/(?P<parent>[\\d]+)/revisions', 95 97 '/wp/v2/pages/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)', 98 '/wp/v2/pages/(?P<parent>[\\d]+)/autosaves', 99 '/wp/v2/pages/(?P<parent>[\\d]+)/autosaves/(?P<id>[\\d]+)', 96 100 '/wp/v2/media', 97 101 '/wp/v2/media/(?P<id>[\\d]+)', … … 156 160 $post_revision_id = $post_revisions[ count( $post_revisions ) - 1 ]->ID; 157 161 162 // Create an autosave. 163 wp_create_post_autosave( 164 array( 165 'post_ID' => $post_id, 166 'post_content' => 'Autosave post content.', 167 'post_type' => 'post', 168 ) 169 ); 170 171 158 172 $page_id = $this->factory->post->create( array( 159 173 'post_type' => 'page', … … 173 187 $page_revision_id = $page_revisions[ count( $page_revisions ) - 1 ]->ID; 174 188 189 // Create an autosave. 190 wp_create_post_autosave( 191 array( 192 'post_ID' => $page_id, 193 'post_content' => 'Autosave page content.', 194 'post_type' => 'page', 195 ) 196 ); 197 175 198 $tag_id = $this->factory->tag->create( array( 176 199 'name' => 'REST API Client Fixture: Tag', … … 259 282 ), 260 283 array( 284 'route' => '/wp/v2/posts/' . $post_id . '/autosaves', 285 'name' => 'postAutosaves', 286 ), 287 array( 288 'route' => '/wp/v2/posts/' . $post_id . '/autosaves/' . $post_revision_id, 289 'name' => 'autosave', 290 ), 291 array( 261 292 'route' => '/wp/v2/pages', 262 293 'name' => 'PagesCollection', … … 273 304 'route' => '/wp/v2/pages/'. $page_id . '/revisions/' . $page_revision_id, 274 305 'name' => 'pageRevision', 306 ), 307 array( 308 'route' => '/wp/v2/pages/' . $page_id . '/autosaves', 309 'name' => 'pageAutosaves', 310 ), 311 array( 312 'route' => '/wp/v2/pages/' . $page_id . '/autosaves/' . $page_revision_id, 313 'name' => 'pageAutosave', 275 314 ), 276 315 array(
Note: See TracChangeset
for help on using the changeset viewer.