*/
public function testActivityReturnTargetAssignee() {
- $description = "Example demonstrates setting & retrieving the target & source";
+ $description = "Demonstrates setting & retrieving activity target & source.";
$subfile = "GetTargetandAssignee";
$params = array(
'source_contact_id' => $this->_contactID,
$this->callAPISuccess('contact', 'create', array('id' => $this->_contactID, 'sort_name' => 'Contact, Test'));
$subfile = 'ContactRefCustomField';
- $description = "demonstrates create with Contact Reference Custom Field";
+ $description = "Demonstrates create with Contact Reference Custom Field.";
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
$params = array(
'custom_group_id' => $ids['custom_group_id'],
$params = $this->_params;
$params['custom_' . $customField['id']] = "$this->_contactID";
- $result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__, $description, $subfile, 'Create');
+ $result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
$result = $this->callAPIAndDocument($this->_entity, 'get', array(
'return.custom_' . $customField['id'] => 1,
'id' => $result['id'],
- ), __FUNCTION__, __FILE__, 'Get with Contact Ref Custom Field', 'ContactRefCustomFieldGet', 'get');
+ ), __FUNCTION__, __FILE__, 'Get with Contact Ref Custom Field', 'ContactRefCustomFieldGet');
$this->assertEquals('Anderson, Anthony', $result['values'][$result['id']]['custom_' . $customField['id']]);
$this->assertEquals($this->_contactID, $result['values'][$result['id']]['custom_' . $customField['id'] . "_id"], ' in line ' . __LINE__);
* Test civicrm_activity_get() with a good activity ID
*/
public function testActivityGetGoodID1() {
- // Insert rows in civicrm_activity creating activities 4 and
- // 13
- $description = "Function demonstrates getting asignee_contact_id & using it to get the contact";
+ // Insert rows in civicrm_activity creating activities 4 and 13
+ $description = "Demonstrates getting assignee_contact_id & using it to get the contact.";
$subfile = 'ReturnAssigneeContact';
$activity = $this->callAPISuccess('activity', 'create', $this->_params);
$result = $this->callAPISuccess('Activity', 'Get', array(
'version' => 3,
));
- $description = "demonstrates _low filter (at time of writing doesn't work if contact_id is set";
+ $description = "Demonstrates _low filter (at time of writing doesn't work if contact_id is set.";
$subfile = "DateTimeLow";
$this->assertEquals(2, $result['count']);
$params = array(
);
$result = $this->callAPIAndDocument('Activity', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals(1, $result['count']);
- $description = "demonstrates _high filter (at time of writing doesn't work if contact_id is set";
+ $description = "Demonstrates _high filter (at time of writing doesn't work if contact_id is set.";
$subfile = "DateTimeHigh";
$this->assertEquals('2012-02-16 00:00:00', $result['values'][0]['activity_date_time']);
$params = array(
'version' => $this->_apiversion,
);
- $result = $this->callAPISuccess('activity', 'delete', $params);
- $this->documentMe($params, $result, __FUNCTION__, __FILE__);
+ $this->callAPIAndDocument('activity', 'delete', $params, __FUNCTION__, __FILE__);
}
/**
*/
public function testGetFields() {
$params = array('action' => 'create');
- $result = $this->callAPIAndDocument('activity', 'getfields', $params, __FUNCTION__, __FILE__, NULL, NULL, 'getfields');
+ $result = $this->callAPIAndDocument('activity', 'getfields', $params, __FUNCTION__, __FILE__, NULL, NULL);
$this->assertTrue(is_array($result['values']), 'get fields doesn\'t return values array');
foreach ($result['values'] as $key => $value) {
$this->assertTrue(is_array($value), $key . " is not an array");