Changeset 56985 for trunk/tests/phpunit/tests/sitemaps/wpSitemapsPosts.php
- Timestamp:
- 10/23/2023 03:40:44 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/sitemaps/wpSitemapsPosts.php
r53556 r56985 60 60 $sitemap_entry = array_shift( $url_list ); 61 61 62 $this->assertArrayHasKey( 'lastmod', $sitemap_entry ); 62 $this->assertEqualSetsWithIndex( 63 array( 64 'loc' => home_url( '/' ), 65 'lastmod' => '2000-01-01', 66 ), 67 $sitemap_entry 68 ); 63 69 } 64 70 … … 67 73 */ 68 74 public function _show_on_front_entry( $sitemap_entry ) { 69 $sitemap_entry['lastmod'] = wp_date( DATE_W3C, time() );75 $sitemap_entry['lastmod'] = '2000-01-01'; 70 76 71 77 return $sitemap_entry; … … 94 100 95 101 foreach ( $post_ids as $post_id ) { 96 $expected[] = array( 'loc' => home_url( "?p={$post_id}" ) ); 102 $expected[] = array( 103 'loc' => home_url( "?p={$post_id}" ), 104 'lastmod' => get_post_modified_time( DATE_W3C, true, $post_id ), 105 ); 97 106 } 98 107
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)