public static function menu()
 {
     FrmAppHelper::maybe_add_permissions();
     if (!current_user_can('frm_view_forms')) {
         return;
     }
     $frm_settings = FrmAppHelper::get_settings();
     add_menu_page('Formidable', $frm_settings->menu, 'frm_view_forms', 'formidable', 'FrmFormsController::route', FrmAppHelper::plugin_url() . '/images/form_16.png', self::get_menu_position());
 }
 public static function menu()
 {
     FrmAppHelper::maybe_add_permissions();
     if (!current_user_can('frm_view_forms')) {
         return;
     }
     $menu_name = FrmAppHelper::get_menu_name();
     add_menu_page('Formidable', $menu_name, 'frm_view_forms', 'formidable', 'FrmFormsController::route', '', self::get_menu_position());
 }
 function set_as_user_role($role)
 {
     // create user
     $user = $this->factory->user->create_and_get(array('role' => $role));
     $this->assertTrue($user->exists(), 'Problem getting user');
     // log in as user
     wp_set_current_user($user->ID);
     $this->assertTrue(current_user_can($role), 'Failed setting the current user role');
     FrmAppHelper::maybe_add_permissions();
     return $user->ID;
 }