/**
  * Clean up after each test. Reset our mocks
  *
  * @since 0.1.0
  */
 public function tearDown()
 {
     parent::tearDown();
     $this->fired_actions = array();
     $sites = ep_get_sites();
     $indexes = array();
     foreach ($sites as $site) {
         switch_to_blog($site['blog_id']);
         ep_delete_index();
         restore_current_blog();
     }
     ep_delete_network_alias();
 }
 /**
  * Map network alias to every index in the network
  *
  * @param array $args
  *
  * @subcommand recreate-network-alias
  * @since      0.9
  *
  * @param array $assoc_args
  */
 public function recreate_network_alias($args, $assoc_args)
 {
     $this->_connect_check();
     WP_CLI::line(__('Recreating network alias...', 'elasticpress'));
     ep_delete_network_alias();
     $create_result = $this->_create_network_alias();
     if ($create_result) {
         WP_CLI::success(__('Done!', 'elasticpress'));
     } else {
         WP_CLI::error(__('An error occurred', 'elasticpress'));
     }
 }