<?php
require_once 'CiviTest/CiviUnitTestCase.php';
+
+/**
+ * Class CRM_Group_Page_AjaxTest
+ */
class CRM_Group_Page_AjaxTest extends CiviUnitTestCase {
/**
* Permissioned group is used both as an active group the contact can see and as a group that allows
protected $_params = array();
+ /**
+ * @return array
+ */
function get_info() {
return array(
'name' => 'Contact BAOs',
$_REQUEST = $this->_params;
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListViewAllContacts() {
$this->setPermissionAndRequest('view all contacts');
}
/**
- * retrieve groups as 'view all contacts' permissioned user
+ * Retrieve groups as 'view all contacts' permissioned user
* Without setting params the default is both enabled & disabled
* (if you do set default it is enabled only)
*/
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListViewAllContactsNotFoundTitle() {
$this->_params['title'] = 'z';
$this->assertEquals(0, $total);
}
/**
- * retrieve groups as 'edit all contacts'
+ * Retrieve groups as 'edit all contacts'
*/
function testGroupListEditAllContacts() {
$this->setPermissionAndRequest('edit all contacts');
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListViewAllContactsEnabled() {
$this->_params['status'] = 1;
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListViewAllContactsDisabled() {
$this->_params['status'] = 2;
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListViewAllContactsDisabledNotFoundTitle() {
$this->_params['status'] = 2;
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListViewAllContactsDisabledFoundTitle() {
$this->_params['status'] = 2;
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListViewAllContactsAll() {
$this->_params['status'] = 3;
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListAccessCiviCRM() {
$this->setPermissionAndRequest('access CiviCRM');
$this->assertEquals(0, $total, 'Total returned should be accurate based on permissions');
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListAccessCiviCRMEnabled() {
$this->_params['status'] = 1;
$this->assertEquals(0, $total, 'Total returned should be accurate based on permissions');
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListAccessCiviCRMDisabled() {
$this->_params['status'] = 2;
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListAccessCiviCRMAll() {
$this->_params['status'] = 2;
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListAccessCiviCRMFound() {
$this->_params['title'] = 'p';
}
/**
- * retrieve groups as 'view all contacts'
+ * Retrieve groups as 'view all contacts'
*/
function testGroupListAccessCiviCRMNotFound() {
$this->_params['title'] = 'z';