public function setPermissionAndRequest($permission) {
CRM_Core_Config::singleton()->userPermissionClass->permissions = (array) $permission;
CRM_Contact_BAO_Group::getPermissionClause(TRUE);
- global $_GET;
- $_GET = $this->_params;
+ global $_REQUEST;
+ $_REQUEST = $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 $_GET;
- $_GET = $this->_params;
+ global $_REQUEST;
+ $_REQUEST = $this->_params;
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('pick-me-active', $groups[2]['title']);
- $this->assertEquals('not-me-active', $groups[4]['title']);
+ $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->setPermissionAndRequest('view all contacts');
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('pick-me-active', $groups[2]['title']);
- $this->assertEquals('not-me-active', $groups[4]['title']);
+ $this->assertEquals('pick-me-active', $groups[2]['group_name']);
+ $this->assertEquals('not-me-active', $groups[4]['group_name']);
// 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('pick-me-active', $groups[2]['title']);
- $this->assertEquals('not-me-active', $groups[4]['title']);
+ $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->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('pick-me-active', $groups[2]['title']);
- $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $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->setPermissionAndRequest(array('edit all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('pick-me-active', $groups[2]['title']);
- $this->assertEquals('not-me-active', $groups[4]['title']);
+ $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->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('pick-me-active', $groups[2]['title']);
- $this->assertEquals('not-me-active', $groups[4]['title']);
+ $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->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(2, $total);
- $this->assertEquals('pick-me-disabled', $groups[1]['title']);
- $this->assertEquals('not-me-disabled', $groups[3]['title']);
+ $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->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, $total);
- $this->assertEquals('not-me-disabled', $groups[3]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">not-me-disabled</span>', $groups[3]['group_name']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(1, $total);
- $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
}
/**
$this->setPermissionAndRequest(array('view all contacts', 'edit groups'));
list($groups, $total) = CRM_Group_Page_AJAX::getGroupList();
$this->assertEquals(4, $total);
- $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']);
+ $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']);
}
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('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
}
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('pick-me-active', $groups[2]['title']);
- $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $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']);
}
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('pick-me-disabled', $groups[1]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
}
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('pick-me-disabled', $groups[1]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
}
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('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
}
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('pick-me-active', $groups[2]['title']);
- $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $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']);
}
/**
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('pick-me-disabled', $groups[1]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
}
/**
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('pick-me-disabled', $groups[1]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-disabled</span>', $groups[1]['group_name']);
}
/**
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('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
}
/**
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('pick-me-active', $groups[2]['title']);
- $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $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']);
}
/**
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('pick-me-active', $groups[2]['title']);
- $this->assertEquals('pick-me-disabled', $groups[1]['title']);
+ $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']);
}
/**
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('pick-me-active', $groups[2]['title']);
+ $this->assertEquals('<span class="crm-editable crmf-title">pick-me-active</span>', $groups[2]['group_name']);
}
/**