public function setup() { $this->user_id = $this->factory->user->create(array('role' => 'administrator')); wp_set_current_user($this->user_id); }