- Timestamp:
- 06/04/2024 10:21:11 AM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r58097 r58326 760 760 } 761 761 762 $datetime_keys = array( 'date', 'date_gmt', 'modified', 'modified_gmt' ); 763 762 764 foreach ( $data as $key => $value ) { 763 if ( is_string( $value ) && ( 764 'date' === $key || 765 'date_gmt' === $key || 766 'modified' === $key || 767 'modified_gmt' === $key 768 ) ) { 769 $data[ $key ] = '2017-02-14T00:00:00'; 770 } else { 771 $data[ $key ] = $this->normalize_fixture( $value, "$path.$key" ); 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 } 772 776 } 777 778 $data[ $key ] = $this->normalize_fixture( $value, "$path.$key" ); 773 779 } 774 780
Note: See TracChangeset
for help on using the changeset viewer.