예제 #1
0
 /**
  * Tests deletion of index when a blog is marked as archived
  * @group 392
  * @link https://github.com/10up/ElasticPress/issues/392
  */
 public function testArchivedSite()
 {
     $index_count = ep_count_indexes();
     $count_indexes = $index_count['total_indexes'];
     $last_blog_id = $index_count['last_blog_id_with_index'];
     update_blog_status($last_blog_id, 'archived', '1');
     $post_delete_count = ep_count_indexes();
     $post_count_indexes = $post_delete_count['total_indexes'];
     $this->assertNotEquals($count_indexes, $post_count_indexes);
 }
예제 #2
0
 /**
  * Tests Deletion of index when a blog is deleted
  */
 public function testDeleteIndex()
 {
     $index_count = ep_count_indexes();
     $count_indexes = $index_count['total_indexes'];
     $last_blog_id = $index_count['last_blog_id_with_index'];
     wpmu_delete_blog($last_blog_id);
     $post_delete_count = ep_count_indexes();
     $post_count_indexes = $post_delete_count['total_indexes'];
     $this->assertNotEquals($count_indexes, $post_count_indexes);
 }