public function setUp() { parent::setUp(); $this->callable_module = Jetpack_Sync_Modules::get_module("functions"); set_current_screen('post-user'); // this only works in is_admin() }
public function setUp() { parent::setUp(); // create a user $this->user_id = $this->factory->user->create(); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); $this->sender->reset_data(); wp_set_current_user(1); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); $this->options_module = Jetpack_Sync_Modules::get_module("options"); $this->options_module->set_options_whitelist(array('test_option')); add_option('test_option', 'foo'); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); $this->post_id = $this->factory->post->create(); $this->comment_ids = $this->factory->comment->create_post_comments($this->post_id); $this->comment = get_comment($this->comment_ids[0]); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); $themes = array('twentyten', 'twentyeleven', 'twentytwelve', 'twentythirteen', 'twentyfourteen'); $this->theme = $themes[rand(0, 4)]; switch_theme($this->theme); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); $user_id = $this->factory->user->create(); // create a post $post_id = $this->factory->post->create(array('post_author' => $user_id)); $this->post = get_post($post_id); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); // create a post $this->meta_module = Jetpack_Sync_Modules::get_module("meta"); Jetpack_Sync_Settings::update_settings(array('post_meta_whitelist' => array('foobar'))); $this->post_id = $this->factory->post->create(); add_post_meta($this->post_id, $this->whitelisted_post_meta, 'foo'); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); $this->sender->reset_data(); $this->terms_module = Jetpack_Sync_Modules::get_module("terms"); $this->taxonomy = 'genre'; register_taxonomy($this->taxonomy, 'post', array('label' => __('Genre'), 'rewrite' => array('slug' => $this->taxonomy), 'hierarchical' => true)); $this->terms_module->set_taxonomy_whitelist(array($this->taxonomy)); // create a post $this->post_id = $this->factory->post->create(); $this->term_object = wp_insert_term('dog', $this->taxonomy); $this->sender->do_sync(); }
public function setUp() { parent::setUp(); }
public function setUp() { parent::setUp(); $this->constant_module = Jetpack_Sync_Modules::get_module("constants"); }
function setUp() { parent::setUp(); $this->full_sync = Jetpack_Sync_Modules::get_module('full-sync'); }
public function setUp() { parent::setUp(); $this->resetCallableAndConstantTimeouts(); $this->constant_module = Jetpack_Sync_Modules::get_module("constants"); }
function setUp() { parent::setUp(); $this->resetCallableAndConstantTimeouts(); }