function test_does_set_silent_flag_true_while_importing() { Jetpack_Sync_Settings::set_importing(true); $this->factory->post->create(); $this->sender->do_sync(); $this->assertObjectHasAttribute('silent', $this->server_event_storage->get_most_recent_event('wp_insert_post')); $this->assertTrue($this->server_event_storage->get_most_recent_event('wp_insert_post')->silent); }
static function set_is_importing_true() { Jetpack_Sync_Settings::set_importing(true); }
function set_defaults() { $this->sync_queue = new Jetpack_Sync_Queue('sync'); $this->full_sync_queue = new Jetpack_Sync_Queue('full_sync'); $this->codec = new Jetpack_Sync_JSON_Deflate_Array_Codec(); // saved settings Jetpack_Sync_Settings::set_importing(null); $settings = Jetpack_Sync_Settings::get_settings(); $this->set_dequeue_max_bytes($settings['dequeue_max_bytes']); $this->set_upload_max_bytes($settings['upload_max_bytes']); $this->set_upload_max_rows($settings['upload_max_rows']); $this->set_sync_wait_time($settings['sync_wait_time']); $this->set_sync_wait_time($settings['enqueue_wait_time']); $this->set_sync_wait_threshold($settings['sync_wait_threshold']); $this->set_max_dequeue_time(Jetpack_Sync_Defaults::get_max_sync_execution_time()); }
static function set_is_importing_true() { require_once dirname(__FILE__) . '/class.jetpack-sync-settings.php'; Jetpack_Sync_Settings::set_importing(true); }