Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed May 3, 2018
1 parent 9d92fb1 commit c4e97f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test-sitemap-creation.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ function test_delete_empty_sitemap() {
wp_delete_post( $post_id, true );
}

$deleted_posts = get_option( 'msm_sitemap_deleted_posts', array() );
$this->assertNotEmpty( $deleted_posts, 'msm_sitemap_deleted_posts does not have deleted posts saved' );
$this->assertArrayHasKey( 'ID', $deleted_posts[0], 'msm_sitemap_deleted_posts has an invalid format' );

MSM_Sitemap_Builder_Cron::generate_sitemap_for_year_month_day( array(
'year' => $year,
'month' => $month,
Expand Down

0 comments on commit c4e97f4

Please sign in to comment.