Changeset 56708
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sitemaps/providers/class-wp-sitemaps-users.php
r52422 r56708 137 137 ); 138 138 139 // We're not supporting sitemaps for author pages for attachments .139 // We're not supporting sitemaps for author pages for attachments. 140 140 unset( $public_post_types['attachment'] ); 141 141 142 142 143 /** -
trunk/tests/phpunit/tests/sitemaps/wpSitemapsUsers.php
r51492 r56708 3 3 /** 4 4 * @group sitemaps 5 6 5 7 */ 6 8 class Tests_Sitemaps_wpSitemapsUsers extends WP_UnitTestCase { … … 11 13 * @var array 12 14 */ 13 p ublicstatic $users;15 p static $users; 14 16 15 17 /** … … 18 20 * @var int 19 21 */ 20 p ublicstatic $editor_id;22 p static $editor_id; 21 23 22 24 /** … … 33 35 * Test getting a URL list for a users sitemap page via 34 36 * WP_Sitemaps_Users::get_url_list(). 37 38 35 39 */ 36 40 public function test_get_url_list_users() { … … 41 45 $expected = array_map( 42 46 static function ( $user_id ) { 43 $post = self::factory()->post->create_and_get( array( 'post_author' => $user_id ) );47 ( array( 'post_author' => $user_id ) ); 44 48 45 49 return array( … … 56 60 $this->assertSameSets( $expected, $url_list ); 57 61 } 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 58 92 }
Note: See TracChangeset
for help on using the changeset viewer.