Example #1
0
 public function setUp()
 {
     parent::setUp();
     $this->old_current_user = get_current_user_id();
     $this->set_current_user($this->factory->user->create(array('role' => 'administrator')));
     $this->keymaster_id = get_current_user_id();
     bbp_set_user_role($this->keymaster_id, bbp_get_keymaster_role());
 }
Example #2
0
 public function setUp()
 {
     parent::setUp();
     $this->old_current_user = get_current_user_id();
     $this->set_current_user($this->factory->user->create(array('role' => 'administrator')));
     $this->keymaster_id = get_current_user_id();
     bbp_set_user_role($this->keymaster_id, bbp_get_keymaster_role());
     if (!function_exists('bbp_admin_repair')) {
         require_once BBP_PLUGIN_DIR . 'includes/admin/tools.php';
     }
 }
Example #3
0
 public function setUp()
 {
     parent::setUp();
     if (isset($_SERVER['HTTP_HOST'])) {
         $this->http_host = $_SERVER['HTTP_HOST'];
     }
     if (isset($_SERVER['SERVER_PORT'])) {
         $this->server_port = $_SERVER['SERVER_PORT'];
     }
     if (isset($_SERVER['REQUEST_URI'])) {
         $this->request_uri = $_SERVER['REQUEST_URI'];
     }
 }