Skip to content
Permalink
Browse files

Add unit test.

  • Loading branch information...
lgedeon committed Feb 21, 2019
1 parent a029ddb commit 981d84325fe9f2aef38f13af195b459427d0528a
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/test-sitemap-filter.php
@@ -45,5 +45,16 @@ function test_secondary_query_not_bypassed() {
}
/**
* Verify that msm_sitemap_index filter runs when build_root_sitemap_xml is called.
*/
function test_msm_sitemap_index_filter_ran() {
$ran = false;
add_filter( 'msm_sitemap_index', function() use ( &$ran ) { $ran = true; return []; } );
Metro_Sitemap::build_root_sitemap_xml();
$this->assertTrue( $ran );
}
}

0 comments on commit 981d843

Please sign in to comment.
You can’t perform that action at this time.