public function setPermissionAndRequest($permission) {
CRM_Core_Config::singleton()->userPermissionClass->permissions = (array) $permission;
CRM_Contact_BAO_Group::getPermissionClause(TRUE);
- global $_REQUEST;
- $_REQUEST = $this->_params;
+ global $_GET;
+ $_GET = $this->_params;
}
/**
CRM_Core_Config::singleton()->userPermissionClass->permissions = (array) $permission;
$this->hookClass->setHook('civicrm_aclGroup', array($this, $hook));
CRM_Contact_BAO_Group::getPermissionClause(TRUE);
- global $_REQUEST;
- $_REQUEST = $this->_params;
+ global $_GET;
+ $_GET = $this->_params;
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-active</span>', $groups[4]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('not-me-active', $groups[4]['title']);
}
/**
$this->setPermissionAndRequest('view all contacts');
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('pick-me-active', $groups[2]['group_name']);
- $this->assertEquals('not-me-active', $groups[4]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('not-me-active', $groups[4]['title']);
// as per changes made in PR-6822
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-active</span>', $groups[4]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('not-me-active', $groups[4]['title']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
/**
$this->setPermissionAndRequest(array('edit all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-active</span>', $groups[4]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('not-me-active', $groups[4]['title']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-active</span>', $groups[4]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('not-me-active', $groups[4]['title']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-disabled</span>', $groups[3]['group_name']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $this->assertEquals('not-me-disabled', $groups[3]['title']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-disabled</span>', $groups[3]['group_name']);
+ $this->assertEquals('not-me-disabled', $groups[3]['title']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(4, $total);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-disabled</span>', $groups[3]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">not-me-active</span>', $groups[4]['group_name']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $this->assertEquals('not-me-disabled', $groups[3]['title']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('not-me-active', $groups[4]['title']);
}
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
}
public function testTraditionalACLNotFoundTitle() {
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(2, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
public function testTraditionalACLDisabled() {
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
public function testTraditionalACLDisabledFoundTitle() {
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
public function testTraditionalACLDisabledNotFoundTitle() {
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
}
public function testTraditionalACLAll() {
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(2, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
/**
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
/**
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
/**
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
}
/**
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(2, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
/**
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(2, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('pick-me-disabled', $groups[1]['title']);
}
/**
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, count($groups), 'Returned groups should exclude disabled by default');
$this->assertEquals(1, $total, 'Total needs to be set correctly');
- $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
+ $this->assertEquals('pick-me-active', $groups[2]['title']);
}
/**