Changeset 58340
- Timestamp:
- 06/05/2024 11:53:31 AM (11 months ago)
- Location:
- trunk/tests
- Files:
-
- 2 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 -
trunk/tests/qunit/fixtures/wp-api-generated.js
r58328 r58340 12324 12324 "tags": [], 12325 12325 "class_list": [ 12326 "post- 1073",12326 "post-4", 12327 12327 "post", 12328 12328 "type-post", … … 12433 12433 "tags": [], 12434 12434 "class_list": [ 12435 "post- 1073",12435 "post-4", 12436 12436 "post", 12437 12437 "type-post", … … 12633 12633 }, 12634 12634 "class_list": [ 12635 "post- 1073",12635 "post-7", 12636 12636 "page", 12637 12637 "type-page", … … 12724 12724 }, 12725 12725 "class_list": [ 12726 "post- 1073",12726 "post-7", 12727 12727 "page", 12728 12728 "type-page", … … 12912 12912 }, 12913 12913 "class_list": [ 12914 "post-10 73",12914 "post-10", 12915 12915 "attachment", 12916 12916 "type-attachment", … … 12981 12981 }, 12982 12982 "class_list": [ 12983 "post-10 73",12983 "post-10", 12984 12984 "attachment", 12985 12985 "type-attachment",
Note: See TracChangeset
for help on using the changeset viewer.