diff --git a/tests/WP/Dashboard/User_Interface/SEO_Scores/Get_Scores_Test.php b/tests/WP/Dashboard/User_Interface/SEO_Scores/Get_Scores_Test.php index 917a021c8f8..f642b75befb 100644 --- a/tests/WP/Dashboard/User_Interface/SEO_Scores/Get_Scores_Test.php +++ b/tests/WP/Dashboard/User_Interface/SEO_Scores/Get_Scores_Test.php @@ -118,7 +118,7 @@ public function test_get_seo_scores( $inserted_posts, $taxonomy_filter, $expecte // Clean up. foreach ( $new_ids as $new_id ) { - $result = \wp_delete_post( $new_id, true ); + \wp_delete_post( $new_id, true ); } \unregister_post_type( 'blog-post' ); \wp_delete_term( $term_id, 'category' ); diff --git a/tests/WP/Sitemaps/Post_Type_Sitemap_Provider_Test.php b/tests/WP/Sitemaps/Post_Type_Sitemap_Provider_Test.php index 9951461b712..c768615f2a2 100644 --- a/tests/WP/Sitemaps/Post_Type_Sitemap_Provider_Test.php +++ b/tests/WP/Sitemaps/Post_Type_Sitemap_Provider_Test.php @@ -102,9 +102,9 @@ public function test_get_index_links_multiple_entries_non_paged() { */ public function test_get_index_links_empty_bucket() { - self::factory()->post->create( [ 'post_date' => '2024-01-01 00:00:01' ] ); - $this->excluded_posts = [ self::factory()->post->create( [ 'post_date' => '2024-01-01 00:00:02' ] ) ]; // Remove this post. - self::factory()->post->create( [ 'post_date' => '2024-01-01 00:00:03' ] ); + self::factory()->post->create( [ 'post_date' => '2024-01-01 00:00:01' ] ); + $this->excluded_posts = [ self::factory()->post->create( [ 'post_date' => '2024-01-01 00:00:02' ] ) ]; // Remove this post. + self::factory()->post->create( [ 'post_date' => '2024-01-01 00:00:03' ] ); \add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', [ $this, 'exclude_post' ] ); \add_filter( 'wpseo_sitemap_entries_per_page', [ $this, 'return_one' ] ); @@ -114,7 +114,6 @@ public function test_get_index_links_empty_bucket() { // Set the page to the second one, which should not contain an entry, but should exist. \set_query_var( 'sitemap_n', '2' ); - // Load the sitemap. $sitemaps = new Sitemaps_Double();