Skip to content

Commit

Permalink
Fix PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidasmi committed Dec 9, 2024
1 parent 8f5b1fd commit 2a64b35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
7 changes: 3 additions & 4 deletions tests/WP/Sitemaps/Post_Type_Sitemap_Provider_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ] );
Expand All @@ -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();
Expand Down

0 comments on commit 2a64b35

Please sign in to comment.