<?php
/**
+ * @file
* File for the TestActivity class
*
* (PHP 5)
/**
- * Test APIv3 civicrm_activity_* functions
+ * Test APIv3 civicrm_activity_* functions
*
* @package CiviCRM_APIv3
* @subpackage API_Activity
protected $_contactID;
/**
- * Test setup for every test.
+ * Test setup for every test.
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
// Connect to the database
}
/**
- * Check if required fields are not passed
+ * Check if required fields are not passed.
*/
public function testActivityCreateWithoutRequired() {
$params = array(
}
/**
- * Test civicrm_activity_create() with mismatched activity_type_id
- * and activity_name
+ * Test civicrm_activity_create() with mismatched activity_type_id
+ * and activity_name.
*/
public function testActivityCreateMismatchNameType() {
$params = array(
}
/**
- * Test civicrm_activity_id() with missing source_contact_id is put with the current user.
+ * Test civicrm_activity_id() with missing source_contact_id is put with the current user.
*/
public function testActivityCreateWithMissingContactId() {
$params = array(
'activity_name' => 'Test activity type',
);
- $result = $this->callAPISuccess('activity', 'create', $params);
+ $this->callAPISuccess('activity', 'create', $params);
}
/**
- * Test civicrm_activity_id() with non-numeric source_contact_id.
+ * Test civicrm_activity_id() with non-numeric source_contact_id.
*/
public function testActivityCreateWithNonNumericContactId() {
$params = array(
}
/**
- * Test civicrm_activity_create() with valid parameters - use type_id.
+ * Test civicrm_activity_create() with valid parameters - use type_id.
*/
public function testActivityCreateCampaignTypeID() {
$this->enableCiviCampaign();
}
/**
- * Test civicrm_activity_create() with valid parameters and custom data.
+ * Test civicrm_activity_create() with valid parameters and custom data.
*/
public function testActivityCreateCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Test civicrm_activity_create() with valid parameters and custom data.
+ * Test civicrm_activity_create() with valid parameters and custom data.
*/
public function testActivityCreateCustomContactRefField() {
}
/**
- * Test civicrm_activity_get() with no params
+ * Test civicrm_activity_get() with no params
*/
public function testActivityGetEmpty() {
$result = $this->callAPISuccess('activity', 'get', array());
}
/**
- * Test civicrm_activity_get() with a good activity ID
+ * Test civicrm_activity_get() with a good activity ID
*/
public function testActivityGetGoodID1() {
// Insert rows in civicrm_activity creating activities 4 and
}
/**
- * test that get functioning does filtering
+ * test that get functioning does filtering.
*/
public function testGetFilter() {
$params = array(
/**
- * Test civicrm_activity_get() with filter target_contact_id
+ * Test civicrm_activity_get() with filter target_contact_id
*/
public function testActivityGetTargetFilter() {
$params = $this->_params;
}
/**
- * test that get functioning does filtering
+ * test that get functioning does filtering.
*/
public function testGetStatusID() {
$params = array(
}
/**
- * test that get functioning does filtering
+ * test that get functioning does filtering.
*/
public function testGetFilterMaxDate() {
$params = array(
}
/**
- * Test civicrm_activity_get() with a good activity ID which
- * has associated custom data
+ * Test civicrm_activity_get() with a good activity ID which
+ * has associated custom data
*/
public function testActivityGetGoodIDCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Test civicrm_activity_get() with a good activity ID which
- * has associated custom data
+ * Test civicrm_activity_get() with a good activity ID which
+ * has associated custom data
*/
public function testActivityGetContact_idCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Check activity deletion without activity type
+ * Check activity deletion without activity type.
*/
public function testDeleteActivityWithoutActivityType() {
$params = array('id' => 1);
}
/**
- * Check activity deletion with incorrect data
+ * Check activity deletion with incorrect data.
*/
public function testDeleteActivityWithIncorrectActivityType() {
$params = array(
}
/**
- * Check activity deletion with correct data
+ * Check activity deletion with correct data.
*/
public function testDeleteActivity() {
$result = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Check if required fields are not passed
+ * Check if required fields are not passed.
*/
public function testActivityUpdateWithoutRequired() {
$params = array(
}
/**
- * Check with incorrect required fields
+ * Check with incorrect required fields.
*/
public function testActivityUpdateWithIncorrectContactActivityType() {
$params = array(
}
/**
- * Test civicrm_activity_update() to update an existing activity
+ * Test civicrm_activity_update() to update an existing activity
*/
public function testActivityUpdate() {
$result = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Test civicrm_activity_update() with valid parameters
- * and some custom data
+ * Test civicrm_activity_update() with valid parameters
+ * and some custom data
*/
public function testActivityUpdateCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Test civicrm_activity_update() for core activity fields
- * and some custom data
+ * Test civicrm_activity_update() for core activity fields
+ * and some custom data
*/
public function testActivityUpdateCheckCoreFields() {
$params = $this->_params;
}
/**
- * Test civicrm_activity_update() where the DB has a date_time
- * value and there is none in the update params.
+ * Test civicrm_activity_update() where the DB has a date_time
+ * value and there is none in the update params.
*/
public function testActivityUpdateNotDate() {
$result = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Check activity update with status
+ * Check activity update with status.
*/
public function testActivityUpdateWithStatus() {
$activity = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Test civicrm_activity_update() where the source_contact_id
- * is not in the update params.
+ * Test civicrm_activity_update() where the source_contact_id
+ * is not in the update params.
*/
public function testActivityUpdateKeepSource() {
$activity = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Test civicrm_activities_contact_get()
+ * Test civicrm_activities_contact_get()
*/
public function testActivitiesContactGet() {
$activity = $this->callAPISuccess('activity', 'create', $this->_params);