- Timestamp:
- 06/05/2024 11:53:31 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r58326 r58340 578 578 'oembeds.html' => '<blockquote class="wp-embedded-content">...</blockquote>...', 579 579 'PostsCollection.0.id' => 4, 580 'PostsCollection.0.class_list.0' => 'post-4', 580 581 'PostsCollection.0.guid.rendered' => 'http://example.org/?p=4', 581 582 'PostsCollection.0.link' => 'http://example.org/?p=4', … … 591 592 'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4', 592 593 'PostModel.id' => 4, 594 'PostModel.class_list.0' => 'post-4', 593 595 'PostModel.guid.rendered' => 'http://example.org/?p=4', 594 596 'PostModel.link' => 'http://example.org/?p=4', … … 622 624 'autosave.guid.rendered' => 'http://example.org/?p=6', 623 625 'PagesCollection.0.id' => 7, 626 'PagesCollection.0.class_list.0' => 'post-7', 624 627 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=7', 625 628 'PagesCollection.0.link' => 'http://example.org/?page_id=7', … … 633 636 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7', 634 637 'PageModel.id' => 7, 638 'PageModel.class_list.0' => 'post-7', 635 639 'PageModel.guid.rendered' => 'http://example.org/?page_id=7', 636 640 'PageModel.link' => 'http://example.org/?page_id=7', … … 664 668 'pageAutosave.guid.rendered' => 'http://example.org/?p=9', 665 669 'MediaCollection.0.id' => 10, 670 'MediaCollection.0.class_list.0' => 'post-10', 666 671 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=10', 667 672 'MediaCollection.0.link' => 'http://example.org/?attachment_id=10', … … 673 678 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10', 674 679 'MediaModel.id' => 10, 680 'MediaModel.class_list.0' => 'post-10', 675 681 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=10', 676 682 'MediaModel.link' => 'http://example.org/?attachment_id=10', … … 763 769 764 770 foreach ( $data as $key => $value ) { 765 if ( is_string( $value ) ) { 766 if ( in_array( $key, $datetime_keys, true ) ) { 767 $data[ $key ] = '2017-02-14T00:00:00'; 768 continue; 769 } 770 771 if ( 1 === preg_match( '/^post-\d+$/', $value ) ) { 772 // Normalize the class value to ensure test stability. 773 $data[ $key ] = 'post-1073'; 774 continue; 775 } 771 if ( is_string( $value ) && in_array( $key, $datetime_keys, true ) ) { 772 $data[ $key ] = '2017-02-14T00:00:00'; 773 continue; 776 774 } 777 775
Note: See TracChangeset
for help on using the changeset viewer.