/**
* Test Generated example of using activity Create API.
*
- * demonstrates create with Contact Reference Custom Field
+ * Demonstrates create with Contact Reference Custom Field.
*
* @return array
* API result array
/**
* Test Generated example of using activity create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using activity get API.
*
- * demonstrates _high filter (at time of writing doesn't work if contact_id is set
+ * Demonstrates _high filter (at time of writing doesn't work if contact_id is set.
*
* @return array
* API result array
/**
* Test Generated example of using activity get API.
*
- * demonstrates _low filter (at time of writing doesn't work if contact_id is set
+ * Demonstrates _low filter (at time of writing doesn't work if contact_id is set.
*
* @return array
* API result array
/**
* Test Generated example of using activity delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using activity get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using activity API.
*
- * Example demonstrates setting & retrieving the target & source
+ * Demonstrates setting & retrieving activity target & source.
*
* @return array
* API result array
/**
* Test Generated example of using activity getfields API.
*
- *
* @return array
* API result array
*/
'activity_type_id' => array(
'name' => 'activity_type_id',
'type' => 1,
- 'title' => 'Activity Type',
+ 'title' => 'Activity Type ID',
'required' => TRUE,
'import' => TRUE,
'where' => 'civicrm_activity.activity_type_id',
'headerPattern' => '/(activity.)?type(.id$)/i',
+ 'export' => TRUE,
'default' => '1',
'html' => array(
'type' => 'Select',
'weight' => array(
'name' => 'weight',
'type' => 1,
- 'title' => 'Weight',
+ 'title' => 'Order',
'html' => array(
'type' => 'Text',
),
/**
* Test Generated example of using activity get API.
*
- * Function demonstrates getting asignee_contact_id & using it to get the contact
+ * Demonstrates getting asignee_contact_id & using it to get the contact.
*
* @return array
* API result array
/**
* Test Generated example of using activity_contact create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using activity_contact delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using address get API.
*
- * Demonstrates Use of Like
+ * Demonstrates Use of Like.
*
* @return array
* API result array
/**
* Test Generated example of using address create API.
*
- * Demonstrates Use of address parsing param
+ * Demonstrates Use of address parsing param.
*
* @return array
* API result array
/**
* Test Generated example of using address get API.
*
- * Demonstrates Use of sort filter
+ * Demonstrates Use of sort filter.
*
* @return array
* API result array
/**
* Test Generated example of using address create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using address delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using address get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using batch create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using batch delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using batch get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using batch update API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using campaign create API.
*
- * Create a campaign - Note use of relative dates here http://www.php.net/manual/en/datetime.formats.relative.php
+ * Create a campaign - Note use of relative dates here:
+ * @link http://www.php.net/manual/en/datetime.formats.relative.php.
*
* @return array
* API result array
/**
* Test Generated example of using campaign delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using campaign get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using case create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contact get API.
*
- * /*this demonstrates the usage of chained api functions. In this case no notes or custom fields have been created
+ * This demonstrates the usage of chained api functions.
+ * In this case no notes or custom fields have been created.
*
* @return array
* API result array
/**
* Test Generated example of using contact get API.
*
- * /*this demonstrates the usage of chained api functions. A variety of return formats are used. Note that no notes
- *custom fields or memberships exist
+ * This demonstrates the usage of chained api functions.
+ * In this case no notes or custom fields have been created.
*
* @return array
* API result array
/**
* Test Generated example of using contact get API.
*
- * /*this demonstrates the usage of chained api functions. A variety of techniques are used
+ * This demonstrates the usage of chained api functions with multiple custom fields.
*
* @return array
* API result array
/**
* Test Generated example of using contact create API.
*
- * /*this demonstrates the usage of chained api functions. Specifically it has one 'parent function' &
- 2 child functions - one receives values from the parent (Contact) and the other child (Tag).
+ * This demonstrates the usage of chained api functions. Specifically it has one 'parent function' &
+ * 2 child functions - one receives values from the parent (Contact) and the other child (Tag).
*
* @return array
* API result array
/**
* Test Generated example of using contact create API.
*
- * test demonstrates the syntax to create 2 chained entities
+ * This demonstrates the syntax to create 2 chained entities.
*
* @return array
* API result array
/**
* Test Generated example of using contact create API.
*
- * demonstrates creating two websites as an array
+ * Demonstrates creating two websites as an array.
*
* @return array
* API result array
/**
* Test Generated example of using contact create API.
*
- * /*this demonstrates setting a custom field through the API
+ * This demonstrates setting a custom field through the API.
*
* @return array
* API result array
/**
* Test Generated example of using contact get API.
*
- * /*this demonstrates setting a custom field through the API
+ * This demonstrates setting a custom field through the API.
*
* @return array
* API result array
/**
* Test Generated example of using contact get API.
*
- * /*this demonstrates setting a custom field through the API
+ * This demonstrates setting a custom field through the API.
*
* @return array
* API result array
/**
* Test Generated example of using contact delete API.
*
- *
* @return array
* API result array
*/
* Test Generated example of using contact create API.
*
* This demonstrates use of the 'format.is_success' param.
- This param causes only the success or otherwise of the function to be returned as BOOLEAN
+ * This param causes only the success or otherwise of the function to be returned as BOOLEAN
*
* @return array
* API result array
* Test Generated example of using contact get API.
*
* This demonstrates use of the 'format.is_success' param.
- This param causes only the success or otherwise of the function to be returned as BOOLEAN
+ * This param causes only the success or otherwise of the function to be returned as BOOLEAN
*
* @return array
* API result array
* Test Generated example of using contact get API.
*
* This demonstrates use of the 'format.id_only' param.
- /* This param causes the id of the only entity to be returned as an integer.
- /* it will be ignored if there is not exactly 1 result
+ * This param causes the id of the only entity to be returned as an integer.
+ * It will be ignored if there is not exactly 1 result
*
* @return array
* API result array
/**
* This example has been generated from the API test suite.
* The test that created it is called
-* testContactGetFormatID_only
+* testContactGetFormatIDOnly
* and can be found in
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* Test Generated example of using contact getvalue API.
*
* This demonstrates use of the 'format.single_value' param.
- /* This param causes only a single value of the only entity to be returned as an string.
- /* it will be ignored if there is not exactly 1 result
+ * This param causes only a single value of the only entity to be returned as an string.
+ * It will be ignored if there is not exactly 1 result
*
* @return array
* API result array
/**
* Test Generated example of using contact get API.
*
- *
* @return array
* API result array
*/
$expectedResult = array(
'is_error' => 0,
'version' => 3,
- 'count' => 17,
+ 'count' => 18,
'values' => array(
'0' => 'create',
'1' => 'delete',
'8' => 'getquick',
'9' => 'getrefcount',
'10' => 'getsingle',
- '11' => 'getvalue',
- '12' => 'merge',
- '13' => 'proximity',
- '14' => 'replace',
- '15' => 'setvalue',
- '16' => 'update',
+ '11' => 'getstat',
+ '12' => 'getvalue',
+ '13' => 'merge',
+ '14' => 'proximity',
+ '15' => 'replace',
+ '16' => 'setvalue',
+ '17' => 'update',
),
'deprecated' => array(
'getquick' => 'The "getquick" action is deprecated in favor of "getlist".',
* Test Generated example of using contact getcount API.
*
* This demonstrates use of the 'getCount' action.
- *
* This param causes the count of the only function to be returned as an integer.
*
* @return array
/**
* This example has been generated from the API test suite.
* The test that created it is called
-* testContactGetFormatCount_only
+* testContactGetFormatCountOnly
* and can be found in
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
/**
* Test Generated example of using contact GetFields API.
*
- * Demonstrate retrieving metadata with custom field options
+ * Demonstrates retrieving metadata with custom field options.
*
* @return array
* API result array
'name' => 'external_identifier',
'type' => 2,
'title' => 'External Identifier',
- 'maxlength' => 32,
+ 'maxlength' => 64,
'size' => 8,
'import' => TRUE,
'where' => 'civicrm_contact.external_identifier',
'extends_entity_column_id' => '',
'is_view' => 0,
'is_multiple' => 0,
- 'option_group_id' => '105',
+ 'option_group_id' => '106',
'date_format' => '',
'time_format' => '',
'is_required' => '1',
'title' => 'Current Employer',
'description' => 'Name of Current Employer',
'type' => 2,
+ 'name' => 'current_employer',
),
'dupe_check' => array(
'title' => 'Check for Duplicates',
'description' => 'Throw error if contact create matches dedupe rule',
+ 'name' => 'dupe_check',
),
),
);
* Test Generated example of using contact getsingle API.
*
* This demonstrates use of the 'format.single_entity_array' param.
- /* This param causes the only contact to be returned as an array without the other levels.
- /* it will be ignored if there is not exactly 1 result
+ * This param causes the only contact to be returned as an array without the other levels.
+ * It will be ignored if there is not exactly 1 result
*
* @return array
* API result array
/**
* This example has been generated from the API test suite.
* The test that created it is called
-* testContactGetSingle_entity_array
+* testContactGetSingleEntityArray
* and can be found in
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
/**
* Test Generated example of using contact getoptions API.
*
- * Demonstrates retrieving options for a custom field
+ * Demonstrates retrieving options for a custom field.
*
* @return array
* API result array
/**
* Test Generated example of using contact get API.
*
- * Get all from group and display contacts
+ * Get all from group and display contacts.
*
* @return array
* API result array
/**
* Test Generated example of using contribution create API.
*
- * Demonstrates creating contribution with Soft Credit by passing in honor_contact_id
+ * Demonstrates creating contribution with Soft Credit by passing in honor_contact_id.
*
* @return array
* API result array
*/
function contribution_create_example() {
$params = array(
- 'contact_id' => 24,
+ 'contact_id' => 23,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'net_amount' => '95',
'source' => 'SSF',
'contribution_status_id' => 1,
- 'honor_contact_id' => 25,
+ 'honor_contact_id' => 24,
);
try{
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '24',
+ 'contact_id' => '23',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '4',
/**
* Test Generated example of using contribution create API.
*
- * Demonstrates creating contribution with Note Entity
+ * Demonstrates creating contribution with Note Entity.
*
* @return array
* API result array
*/
function contribution_create_example() {
$params = array(
- 'contact_id' => 18,
+ 'contact_id' => 17,
'receive_date' => '2012-01-01',
'total_amount' => '100',
'financial_type_id' => 1,
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '18',
+ 'contact_id' => '17',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '1',
/**
* Test Generated example of using contribution create API.
*
- * Demonstrates creating contribution with SoftCredit
+ * Demonstrates creating contribution with SoftCredit.
*
* @return array
* API result array
*/
function contribution_create_example() {
$params = array(
- 'contact_id' => 20,
+ 'contact_id' => 19,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'contribution_status_id' => 1,
'soft_credit' => array(
'1' => array(
- 'contact_id' => 21,
+ 'contact_id' => 20,
'amount' => 50,
'soft_credit_type_id' => 3,
),
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '20',
+ 'contact_id' => '19',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '4',
/**
* Test Generated example of using contribution create API.
*
- * Demonstrates creating contribution with Soft Credit defaults for amount and type
+ * Demonstrates creating contribution with Soft Credit defaults for amount and type.
*
* @return array
* API result array
*/
function contribution_create_example() {
$params = array(
- 'contact_id' => 22,
+ 'contact_id' => 21,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'net_amount' => '95',
'source' => 'SSF',
'contribution_status_id' => 1,
- 'soft_credit_to' => 23,
+ 'soft_credit_to' => 22,
);
try{
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '22',
+ 'contact_id' => '21',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '4',
/**
* Test Generated example of using contribution create API.
*
- *
* @return array
* API result array
*/
function contribution_create_example() {
$params = array(
- 'contact_id' => 1,
+ 'contact_id' => 31,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '1',
+ 'contact_id' => '31',
'financial_type_id' => '1',
'contribution_page_id' => '1',
'payment_instrument_id' => '4',
/**
* Test Generated example of using contribution create API.
*
- * Create Contribution with Nested Line Items
+ * Create Contribution with Nested Line Items.
*
* @return array
* API result array
*/
function contribution_create_example() {
$params = array(
- 'contact_id' => 10,
+ 'contact_id' => 9,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '10',
+ 'contact_id' => '9',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '1',
/**
* Test Generated example of using contribution delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution get API.
*
- *
* @return array
* API result array
*/
'contribution_campaign_id' => '',
'financial_type_id' => '1',
'financial_type' => 'Donation',
- 'instrument_id' => '89',
- 'payment_instrument' => 'Check',
'product_id' => '',
'product_name' => '',
'sku' => '',
'contribution_note' => '',
'contribution_batch' => '',
'contribution_status' => 'Completed',
- 'contribution_payment_instrument' => 'Check',
+ 'payment_instrument' => 'Check',
+ 'payment_instrument_id' => '4',
+ 'instrument_id' => '4',
'contribution_check_number' => '',
'id' => '1',
'contribution_type_id' => '1',
/**
* Test Generated example of using contribution_page create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_page delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_page get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_recur create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_recur delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_recur get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_soft create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_soft delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using contribution_soft get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using country create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using country delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using country get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using custom_field create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using custom_field delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using custom_group create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using custom_group delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using custom_group get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using custom_value create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using custom_value get API.
*
- * /*this demonstrates the use of CustomValue get
+ * This demonstrates the use of CustomValue get to fetch single and multi-valued custom data.
*
* @return array
* API result array
/**
* Test Generated example of using domain create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using domain get API.
*
- *
* @return array
* API result array
*/
'0' => array(
'id' => '1',
'name' => 'Default Domain Name',
- 'config_backend' => 'a:82:{s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:10:\"4.6.alpha1\";s:11:\"empoweredBy\";b:1;s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":5:{s:19:\"supports_UF_Logging\";b:1;s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;}',
+ 'config_backend' => 'a:82:{s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:10:\"4.6.alpha7\";s:11:\"empoweredBy\";b:1;s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":5:{s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:19:\"supports_UF_Logging\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;}',
'version' => '3',
'contact_id' => '3',
'locale_custom_strings' => 'a:1:{s:5:\"en_US\";a:0:{}}',
'1' => array(
'id' => '2',
'name' => 'Second Domain',
- 'config_backend' => 'a:82:{s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:10:\"4.6.alpha1\";s:11:\"empoweredBy\";b:1;s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":5:{s:19:\"supports_UF_Logging\";b:1;s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;}',
+ 'config_backend' => 'a:82:{s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:10:\"4.6.alpha7\";s:11:\"empoweredBy\";b:1;s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":5:{s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:19:\"supports_UF_Logging\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;}',
'version' => '4.6.alpha1',
'contact_id' => '2',
'domain_email' => '\"Domain Email\" <domainemail2@example.org>',
/**
* Test Generated example of using email create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using email delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using email replace API.
*
- * example demonstrates use of Replace in a nested API call
+ * Demonstrates use of Replace in a nested API call.
*
* @return array
* API result array
/**
* Test Generated example of using email replace API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using entity_tag create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using entity_tag delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using entity_tag get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using event create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using event delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using event get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using event get API.
*
- * demonstrates use of is.Current option
+ * Demonstrates use of is.Current option.
*
* @return array
* API result array
/**
* Test Generated example of using event getsingle API.
*
- * demonstrates use of return is_full
+ * Demonstrates use of return is_full .
*
* @return array
* API result array
'is_multiple_registrations' => 0,
'allow_same_participant_emails' => 0,
'is_template' => 0,
- 'created_date' => '2015-01-15 02:10:12',
+ 'created_date' => '2015-02-16 11:40:40',
'is_share' => '1',
'is_confirm_enabled' => '1',
'is_billing_required' => 0,
/**
* Test Generated example of using grant create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using grant delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using grant get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group getfields API.
*
- * demonstrate use of getfields to interrogate api
+ * Demonstrate use of getfields to interrogate api.
*
* @return array
* API result array
/**
* Test Generated example of using group_contact create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_contact delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_contact get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_contact get API.
*
- * Get all from group and display contacts
+ * Get all from group and display contacts.
*
* @return array
* API result array
/**
* Test Generated example of using group_nesting create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_nesting delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_nesting get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_organization create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_organization delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using group_organization get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using im create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using im delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using im get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using job create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using job delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using line_item create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using line_item delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using line_item get API.
*
- *
* @return array
* API result array
*/
'contribution_id' => '2',
'price_field_id' => '1',
'label' => 'Contribution Amount',
- 'qty' => '1',
+ 'qty' => '1.00',
'unit_price' => '100.00',
'line_total' => '100.00',
'price_field_value_id' => '1',
/**
* Test Generated example of using loc_block create API.
*
- * Create entities and locBlock in 1 api call
+ * Create entities and locBlock in 1 api call.
*
* @return array
* API result array
/**
* Test Generated example of using mail_settings get API.
*
- * demonstrates get + delete in the same call
+ * Demonstrates get + delete in the same call.
*
* @return array
* API result array
/**
* Test Generated example of using mail_settings create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using mail_settings delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using mail_settings get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using mailing create API.
*
- *
* @return array
* API result array
*/
function mailing_create_example() {
$params = array(
'subject' => 'Hello {contact.display_name}',
- 'body_text' => 'This is {contact.display_name}',
- 'body_html' => '<p>This is {contact.display_name}</p>',
+ 'body_text' => 'This is {contact.display_name}.
+{domain.address}{action.optOutUrl}',
+ 'body_html' => '<p>This is {contact.display_name}.</p><p>{domain.address}{action.optOutUrl}</p>',
'name' => 'mailing name',
'created_id' => 3,
+ 'header_id' => '',
+ 'footer_id' => '',
+ 'scheduled_date' => 'now',
);
try{
'domain_id' => '1',
'header_id' => '',
'footer_id' => '',
- 'reply_id' => '',
- 'unsubscribe_id' => '',
- 'resubscribe_id' => '',
- 'optout_id' => '',
+ 'reply_id' => '8',
+ 'unsubscribe_id' => '5',
+ 'resubscribe_id' => '6',
+ 'optout_id' => '7',
'name' => 'mailing name',
'from_name' => 'FIXME',
'from_email' => 'info@EXAMPLE.ORG',
'replyto_email' => 'info@EXAMPLE.ORG',
'subject' => 'Hello {contact.display_name}',
- 'body_text' => 'This is {contact.display_name}',
- 'body_html' => '<p>This is {contact.display_name}</p>',
+ 'body_text' => 'This is {contact.display_name}.
+{domain.address}{action.optOutUrl}',
+ 'body_html' => '<p>This is {contact.display_name}.</p><p>{domain.address}{action.optOutUrl}</p>',
'url_tracking' => '1',
'forward_replies' => '',
- 'auto_responder' => 0,
+ 'auto_responder' => '',
'open_tracking' => '1',
'is_completed' => '',
'msg_template_id' => '',
'created_id' => '3',
'created_date' => '2013-07-28 08:49:19',
'scheduled_id' => '',
- 'scheduled_date' => '',
+ 'scheduled_date' => '20130728085413',
'approver_id' => '',
'approval_date' => '',
'approval_status_id' => '',
'is_archived' => '',
'visibility' => 'Public Pages',
'campaign_id' => '',
- 'dedupe_email' => '',
+ 'dedupe_email' => '1',
'sms_provider_id' => '',
'hash' => '',
'location_type_id' => '',
'email_selection_method' => '',
- 'api.mailing_job.create' => array(
- 'is_error' => 0,
- 'version' => 3,
- 'count' => 1,
- 'id' => 1,
- 'values' => array(
- '0' => array(
- 'id' => '1',
- 'mailing_id' => '1',
- 'scheduled_date' => '20130728085413',
- 'start_date' => '',
- 'end_date' => '',
- 'status' => 'Scheduled',
- 'is_test' => 0,
- 'job_type' => '',
- 'parent_id' => '',
- 'job_offset' => '',
- 'job_limit' => '',
- ),
- ),
- ),
),
),
);
/**
* Test Generated example of using mailing delete API.
*
- *
* @return array
* API result array
*/
function mailing_delete_example() {
$params = array(
- 'id' => 12,
+ 'id' => 16,
);
try{
/**
* Test Generated example of using mailing submit API.
*
- *
* @return array
* API result array
*/
'domain_id' => '1',
'header_id' => '',
'footer_id' => '',
- 'reply_id' => '',
- 'unsubscribe_id' => '',
- 'resubscribe_id' => '',
- 'optout_id' => '',
+ 'reply_id' => '8',
+ 'unsubscribe_id' => '5',
+ 'resubscribe_id' => '6',
+ 'optout_id' => '7',
'name' => 'mailing name',
'from_name' => 'FIXME',
'from_email' => 'info@EXAMPLE.ORG',
'replyto_email' => 'info@EXAMPLE.ORG',
'subject' => 'Hello {contact.display_name}',
- 'body_text' => 'This is {contact.display_name}',
- 'body_html' => '<p>This is {contact.display_name}</p>',
+ 'body_text' => 'This is {contact.display_name}.
+{domain.address}{action.optOutUrl}',
+ 'body_html' => '<p>This is {contact.display_name}.</p><p>{domain.address}{action.optOutUrl}</p>',
'url_tracking' => '1',
'forward_replies' => 0,
'auto_responder' => 0,
'is_archived' => 0,
'visibility' => 'Public Pages',
'campaign_id' => '',
- 'dedupe_email' => 0,
+ 'dedupe_email' => '1',
'sms_provider_id' => '',
'hash' => '67eac7789eaee00',
- 'location_type_id' => '',
- 'email_selection_method' => '',
+ 'location_type_id' => 0,
+ 'email_selection_method' => 'automatic',
),
),
);
--- /dev/null
+<?php
+/**
+ * Test Generated example of using mailing_a_b create API.
+ *
+ * @return array
+ * API result array
+ */
+function mailing_a_b_create_example() {
+ $params = array(
+ 'mailing_id_a' => 1,
+ 'mailing_id_b' => 2,
+ 'mailing_id_c' => 3,
+ 'testing_criteria_id' => 1,
+ 'winner_criteria_id' => 1,
+ 'declare_winning_time' => '+2 days',
+ 'group_percentage' => 10,
+ );
+
+ try{
+ $result = civicrm_api3('mailing_a_b', 'create', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array(
+ 'error' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ );
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function mailing_a_b_create_expectedresult() {
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 1,
+ 'values' => array(
+ '1' => array(
+ 'id' => '1',
+ 'name' => '',
+ 'status' => '',
+ 'mailing_id_a' => '1',
+ 'mailing_id_b' => '2',
+ 'mailing_id_c' => '3',
+ 'domain_id' => '1',
+ 'testing_criteria_id' => '1',
+ 'winner_criteria_id' => '1',
+ 'specific_url' => '',
+ 'declare_winning_time' => '20150218114218',
+ 'group_percentage' => '10',
+ ),
+ ),
+ );
+
+ return $expectedResult;
+}
+
+/**
+* This example has been generated from the API test suite.
+* The test that created it is called
+* testMailingABCreateSuccess
+* and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingABTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
/**
* Test Generated example of using membership create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership update API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership get API.
*
- * Demonstrates use of 'filter' active_only' param
+ * Demonstrates use of 'filter' active_only' param.
*
* @return array
* API result array
/**
* Test Generated example of using membership_payment create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership_payment get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership_status create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership_status get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership_type create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership_type delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using membership_type get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using message_template create API.
*
- *
* @return array
* API result array
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 65,
+ 'id' => 67,
'values' => array(
- '65' => array(
- 'id' => '65',
+ '67' => array(
+ 'id' => '67',
'msg_title' => 'msg_title_165',
'msg_subject' => 'msg_subject_165',
'msg_text' => 'msg_text_165',
/**
* Test Generated example of using message_template delete API.
*
- *
* @return array
* API result array
*/
function message_template_delete_example() {
$params = array(
- 'id' => 68,
+ 'id' => 70,
);
try{
/**
* Test Generated example of using message_template get API.
*
- *
* @return array
* API result array
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 66,
+ 'id' => 68,
'values' => array(
- '66' => array(
- 'id' => '66',
+ '68' => array(
+ 'id' => '68',
'msg_title' => 'msg_title_166',
'msg_subject' => 'msg_subject_166',
'msg_text' => 'msg_text_166',
/**
* Test Generated example of using note create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using note delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using note get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using option_group create API.
*
- *
* @return array
* API result array
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 92,
+ 'id' => 93,
'values' => array(
'0' => array(
- 'id' => '92',
+ 'id' => '93',
'name' => 'civicrm_event.amount.560',
'title' => '',
'description' => '',
'is_reserved' => '1',
'is_active' => '1',
'is_locked' => '',
- 'api.OptionValue.create' => 780,
+ 'api.OptionValue.create' => 784,
),
),
);
/**
* Test Generated example of using option_group delete API.
*
- *
* @return array
* API result array
*/
function option_group_delete_example() {
$params = array(
- 'id' => 97,
+ 'id' => 98,
);
try{
/**
* Test Generated example of using option_group get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using option_value get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using option_value getsingle API.
*
- * demonstrates use of Sort param (available in many api functions). Also, getsingle
+ * Demonstrates use of Sort param (available in many api functions). Also, getsingle.
*
* @return array
* API result array
/**
* Test Generated example of using participant create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using participant create API.
*
- * single function to create contact w partipation & contribution. Note that in the
- case of 'contribution' the 'create' is implied (api.contribution.create)
+ * Single function to create contact with partipation & contribution.
+ * Note that in the case of 'contribution' the 'create' is implied (api.contribution.create)
*
* @return array
* API result array
/**
* Test Generated example of using participant get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using participant Get API.
*
- * Criteria delete by nesting a GET & a DELETE
+ * Criteria delete by nesting a GET & a DELETE.
*
* @return array
* API result array
/**
* Test Generated example of using participant get API.
*
- * use nested get to get an event
+ * Demonstrates use of nested get to fetch event data with participant records.
*
* @return array
* API result array
/**
* Test Generated example of using participant_payment create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using participant_payment delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using participant_payment get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using participant_status_type create API.
*
- *
* @return array
* API result array
*/
'id' => '16',
'name' => 'test status',
'label' => 'I am a test',
- 'class' => '14',
+ 'class' => 'Positive',
'is_reserved' => 0,
'is_active' => '1',
'is_counted' => '1',
/**
* Test Generated example of using participant_status_type delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using participant_status_type get API.
*
- *
* @return array
* API result array
*/
'id' => '17',
'name' => 'test status',
'label' => 'I am a test',
- 'class' => '14',
+ 'class' => 'Positive',
'is_reserved' => 0,
'is_active' => '1',
'is_counted' => '1',
/**
* Test Generated example of using payment_processor create API.
*
- *
* @return array
* API result array
*/
function payment_processor_create_example() {
$params = array(
'name' => 'API Test PP',
- 'payment_processor_type_id' => 1,
+ 'payment_processor_type_id' => 18,
'class_name' => 'CRM_Core_Payment_APITest',
'is_recur' => 0,
'domain_id' => 1,
/**
* Test Generated example of using payment_processor delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using payment_processor_type create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using payment_processor_type delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using phone create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using phone delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using phone get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using pledge create API.
*
- *
* @return array
* API result array
*/
function pledge_create_example() {
$params = array(
'contact_id' => 11,
- 'pledge_create_date' => '20150115',
- 'start_date' => '20150115',
- 'scheduled_date' => '20150117',
+ 'pledge_create_date' => '20150216',
+ 'start_date' => '20150216',
+ 'scheduled_date' => '20150218',
'amount' => '100',
'pledge_status_id' => '2',
'pledge_financial_type_id' => '1',
/**
* Test Generated example of using pledge delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using pledge get API.
*
- *
* @return array
* API result array
*/
'display_name' => 'Mr. Anthony Anderson II',
'pledge_id' => '1',
'pledge_amount' => '100.00',
- 'pledge_create_date' => '2015-01-15 00:00:00',
+ 'pledge_create_date' => '2015-02-16 00:00:00',
'pledge_status' => 'Pending',
'pledge_total_paid' => '',
- 'pledge_next_pay_date' => '2015-01-17 00:00:00',
+ 'pledge_next_pay_date' => '2015-02-18 00:00:00',
'pledge_next_pay_amount' => '20.00',
'pledge_outstanding_amount' => '',
'pledge_financial_type' => 'Donation',
*/
function pledge_get_example() {
$params = array(
- 'pledge_start_date_high' => '20150113034845',
+ 'pledge_start_date_high' => '20150214114707',
);
try{
'display_name' => 'Mr. Anthony Anderson II',
'pledge_id' => '2',
'pledge_amount' => '100.00',
- 'pledge_create_date' => '2015-01-15 00:00:00',
+ 'pledge_create_date' => '2015-02-16 00:00:00',
'pledge_status' => 'Overdue',
'pledge_total_paid' => '',
'pledge_next_pay_date' => '2014-03-07 00:00:00',
/**
* Test Generated example of using pledge_payment create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using pledge_payment delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using pledge_payment get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using pledge_payment update API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_field create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_field delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_field get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_field_value create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_field_value delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_field_value get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_set create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_set delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using price_set get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using profile apply API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using profile get API.
*
- *
* @return array
* API result array
*/
'profile_id' => array(
'api.required' => TRUE,
'title' => 'Profile ID',
+ 'name' => 'profile_id',
),
),
);
/**
* Test Generated example of using profile submit API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using relationship get API.
*
- * demonstrates use of BETWEEN filter
+ * Demonstrates use of BETWEEN filter.
*
* @return array
* API result array
/**
* Test Generated example of using relationship create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using relationship delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using relationship get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using relationship get API.
*
- * demonstrates use of IN filter
+ * Demonstrates use of IN filter.
*
* @return array
* API result array
/**
* Test Generated example of using relationship get API.
*
- * demonstrates use of Not BETWEEN filter
+ * Demonstrates use of Not BETWEEN filter.
*
* @return array
* API result array
/**
* Test Generated example of using relationship get API.
*
- * demonstrates use of NOT IN filter
+ * Demonstrates use of NOT IN filter.
*
* @return array
* API result array
/**
* Test Generated example of using relationship get API.
*
- * demonstrates is_current filter
+ * Demonstrates is_current filter.
*
* @return array
* API result array
/**
* Test Generated example of using relationship_type create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using relationship_type delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using report_template getrows API.
*
- * Retrieve rows from a report template (optionally providing the instance_id)
+ * Retrieve rows from a report template (optionally providing the instance_id).
*
* @return array
* API result array
/**
* Test Generated example of using report_template getstatistics API.
*
- * Get Statistics from a report (note there isn't much data to get in the test DB :-(
+ * Get Statistics from a report (note there isn't much data to get in the test DB).
*
* @return array
* API result array
/**
* Test Generated example of using setting create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using setting create API.
*
- * shows setting a variable for all domains
+ * Shows setting a variable for all domains.
*
* @return array
* API result array
/**
* Test Generated example of using setting create API.
*
- * shows setting a variable for a current domain
+ * Shows setting a variable for a current domain.
*
* @return array
* API result array
/**
* Test Generated example of using setting create API.
*
- * shows setting a variable for specified domains
+ * Shows setting a variable for specified domains.
*
* @return array
* API result array
/**
* Test Generated example of using setting get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using setting Get API.
*
- * shows getting a variable for all domains
+ * Shows getting a variable for all domains.
*
* @return array
* API result array
/**
* Test Generated example of using setting getdefaults API.
*
- * gets defaults setting a variable for a given domain - if no domain is set current is assumed
+ * Gets defaults setting a variable for a given domain - if no domain is set current is assumed.
*
* @return array
* API result array
'config_only' => 1,
'type' => 'String',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 64,
'maxlength' => 256,
),
+ 'html_type' => 'Text',
'default' => '',
'add' => '4.3',
'title' => 'Path to wkhtmltopdf executable',
'config_only' => 1,
'type' => 'String',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 64,
'maxlength' => 64,
),
+ 'html_type' => 'Text',
'default' => '',
'add' => '4.3',
'title' => 'Recaptcha Public Key',
'config_only' => 1,
'type' => 'String',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 64,
'maxlength' => 64,
),
+ 'html_type' => 'Text',
'default' => '',
'add' => '4.3',
'title' => 'Recaptcha Private Key',
'config_only' => 1,
'type' => 'Integer',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 3,
'maxlength' => 5,
),
+ 'html_type' => 'Text',
'default' => '',
'add' => '4.3',
'title' => 'Dashboard cache timeout',
'prefetch' => 1,
'type' => 'Integer',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 2,
'maxlength' => 8,
),
+ 'html_type' => 'Text',
'default' => 7,
'add' => '4.3',
'title' => 'Checksum Lifespan',
'prefetch' => 0,
'type' => 'String',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 64,
'maxlength' => 128,
),
+ 'html_type' => 'Text',
'default' => '*default*',
'add' => '4.3',
'title' => 'Blog Feed URL',
'prefetch' => 0,
'type' => 'String',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 64,
'maxlength' => 128,
),
+ 'html_type' => 'Text',
'default' => '*default*',
'add' => '4.3',
'title' => 'Community Messages URL',
'config_only' => 1,
'type' => 'String',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 16,
'maxlength' => 16,
),
+ 'html_type' => 'Text',
'default' => '',
'add' => '4.3',
'title' => 'Resource Cache Code',
'description' => '',
'help_text' => '',
'on_change' => array(
- '0' => array(
- '0' => 'CRM_Case_Info',
- '1' => 'onToggleComponents',
- ),
- '1' => array(
- '0' => 'CRM_Core_Component',
- '1' => 'flushEnabledComponents',
- ),
+ '0' => 'CRM_Case_Info::onToggleComponents',
+ '1' => 'CRM_Core_Component::flushEnabledComponents',
+ '2' => 'call://resources/resetCacheCode',
),
),
'disable_core_css' => array(
'is_contact' => 0,
'description' => 'Set this value to Yes if you want CiviCRM error/debugging messages to also appear in Drupal error logs',
'prefetch' => 1,
- 'help_text' => 'Set this value to Yes if you want CiviCRM error/debugging messages the appear in your CMS\' error log.
-In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal\'s watchdog enabled)',
+ 'help_text' => 'Set this value to Yes if you want CiviCRM error/debugging messages the appear in your CMS\' error log. In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal\'s watchdog enabled)',
),
'backtrace' => array(
'group_name' => 'Developer Preferences',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
- 'title' => 'Enable Double Opt-in for Profile Group(s) field',
+ 'title' => 'Track replies using VERP in Reply-To header',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'When CiviMail is enabled, users who \"subscribe\" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
+ 'description' => 'If checked, mailings will default to tracking replies using VERP-ed Reply-To. ',
'help_text' => '',
'validate_callback' => 'CRM_Core_BAO_Setting::validateBoolSetting',
),
'prefetch' => 0,
'type' => 'String',
'quick_form_type' => 'Element',
- 'html_type' => 'Text',
'html_attributes' => array(
'size' => 64,
'maxlength' => 64,
),
+ 'html_type' => 'Text',
'default' => 'simple',
'add' => '4.5',
'title' => 'How to handle full-tet queries',
/**
* Test Generated example of using setting get API.
*
- * shows getting a variable for a current domain
+ * Shows getting a variable for a current domain.
*
* @return array
* API result array
/**
* Test Generated example of using setting Get API.
*
- * shows getting a variable for specified domains
+ * Shows getting a variable for specified domains.
*
* @return array
* API result array
/**
* Test Generated example of using setting getvalue API.
*
- * Demonstrates getvalue action - intended for runtime use as better caching than get
+ * Demonstrates getvalue action - intended for runtime use as better caching than get.
*
* @return array
* API result array
/**
* Test Generated example of using setting revert API.
*
- * Demonstrates reverting a parameter to default value
+ * Demonstrates reverting a parameter to default value.
*
* @return array
* API result array
/**
* Test Generated example of using survey get API.
*
- * demonstrates get + delete in the same call
+ * Demonstrates get + delete in the same call.
*
* @return array
* API result array
/**
* Test Generated example of using survey create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using survey delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using survey get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using tag create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using tag delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using tag get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using tag getlist API.
*
- * Demonstrates use of api.getlist for autocomplete and quicksearch applications
+ * Demonstrates use of api.getlist for autocomplete and quicksearch applications.
*
* @return array
* API result array
/**
* Test Generated example of using tag getfields API.
*
- * demonstrate use of getfields to interrogate api
+ * Demonstrate use of getfields to interrogate api.
*
* @return array
* API result array
/**
* Test Generated example of using tag get API.
*
- * demonstrates use of Return as an array
+ * Demonstrates use of Return as an array.
*
* @return array
* API result array
/**
* Test Generated example of using tax_contribution_page create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using tax_contribution_page create API.
*
- * Create Contribution with Nested Line Items
+ * Create Contribution with Nested Line Items.
*
* @return array
* API result array
/**
* Test Generated example of using tax_contribution_page delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_field create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_field delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_field get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_field replace API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_group create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_group delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_group get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_join create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_join get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using uf_match get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using website create API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using website delete API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using website get API.
*
- *
* @return array
* API result array
*/
/**
* Test Generated example of using website getfields API.
*
- *
* @return array
* API result array
*/
else {
$fnPrefix = strtolower(preg_replace('/(?<! )(?<!^)[A-Z]/', '_$0', $entity));
}
+ // Format multiline description as array
+ $desc = array();
+ if (is_string($description) && strlen($description)) {
+ foreach (explode("\n", $description) as $line) {
+ $desc[] = trim($line);
+ }
+ }
$smarty = CRM_Core_Smarty::singleton();
$smarty->assign('testfunction', $function);
$function = $fnPrefix . "_" . strtolower($action);
$smarty->assign('params', $params);
$smarty->assign('entity', $entity);
$smarty->assign('filename', basename($filename));
- $smarty->assign('description', $description);
+ $smarty->assign('description', $desc);
$smarty->assign('result', $result);
$smarty->assign('action', $action);
*/
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'],
* 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 asignee_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(
'contact_id' => $this->_contactID,
);
$subfile = "AddressParse";
- $description = "Demonstrates Use of address parsing param";
+ $description = "Demonstrates Use of address parsing param.";
$result = $this->callAPIAndDocument('address', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals(54, $result['values'][$result['id']]['street_number'], 'In line ' . __LINE__);
$this->assertEquals('A', $result['values'][$result['id']]['street_number_suffix'], 'In line ' . __LINE__);
$create = $this->callAPISuccess('address', 'create', $this->_params);
$this->callAPISuccess('address', 'create', array_merge($this->_params, array('street_address' => 'yzy')));
$subfile = "AddressSort";
- $description = "Demonstrates Use of sort filter";
+ $description = "Demonstrates Use of sort filter.";
$params = array(
'options' => array(
'sort' => 'street_address DESC',
public function testGetAddressLikeSuccess() {
$this->callAPISuccess('address', 'create', $this->_params);
$subfile = "AddressLike";
- $description = "Demonstrates Use of Like";
+ $description = "Demonstrates Use of Like.";
$params = array(
'street_address' => array('LIKE' => '%mb%'),
'sequential' => 1,
}
public function testCreateCampaign() {
- $description = "Create a campaign - Note use of relative dates here http://www.php.net/manual/en/datetime.formats.relative.php";
+ $description = "Create a campaign - Note use of relative dates here:
+ @link http://www.php.net/manual/en/datetime.formats.relative.php.";
$result = $this->callAPIAndDocument('campaign', 'create', $this->params, __FUNCTION__, __FILE__, $description);
$this->assertEquals(1, $result['count'], 'In line ' . __LINE__);
$this->assertNotNull($result['values'][$result['id']]['id'], 'In line ' . __LINE__);
$params = $this->_params;
$params['custom_' . $ids['custom_field_id']] = "custom string";
- $description = "/*this demonstrates setting a custom field through the API ";
+ $description = "This demonstrates setting a custom field through the API.";
$result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__, $description);
$check = $this->callAPISuccess($this->_entity, 'get', array(
$params = $this->_params;
$params['custom_' . $ids['custom_field_id']] = "custom string";
- $description = "/*this demonstrates setting a custom field through the API ";
+ $description = "This demonstrates setting a custom field through the API.";
$subfile = "CustomFieldGet";
$result = $this->callAPISuccess($this->_entity, 'create', $params);
$params = $this->_params;
$params['custom_' . $ids['custom_field_id']] = "custom string";
- $description = "/*this demonstrates setting a custom field through the API ";
+ $description = "This demonstrates setting a custom field through the API.";
$subfile = "CustomFieldGetReturnSyntaxVariation";
$result = $this->callAPISuccess($this->_entity, 'create', $params);
$params = array('return' => 'custom_' . $ids['custom_field_id'], 'id' => $result['id']);
public function testGetGroupIDFromContact() {
$groupId = $this->groupCreate();
- $description = "Get all from group and display contacts";
+ $description = "Get all from group and display contacts.";
$subFile = "GroupFilterUsingContactAPI";
$params = array(
'email' => 'man2@yahoo.com',
* Verify that attempt to create individual contact with two chained websites succeeds.
*/
public function testCreateIndividualWithContributionDottedSyntax() {
- $description = "test demonstrates the syntax to create 2 chained entities";
+ $description = "This demonstrates the syntax to create 2 chained entities.";
$subFile = "ChainTwoWebsites";
$params = array(
'first_name' => 'abc3',
),
);
- $description = "demonstrates creating two websites as an array";
+ $description = "Demonstrates creating two websites as an array.";
$subfile = "ChainTwoWebsitesSyntax2";
$result = $this->callAPIAndDocument('Contact', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
$params['custom_' . $ids['custom_field_id']] = "custom string";
$moreIDs = $this->CustomGroupMultipleCreateWithFields();
- $description = "/*this demonstrates the usage of chained api functions. In this case no notes or custom fields have been created ";
+ $description = "This demonstrates the usage of chained api functions.\nIn this case no notes or custom fields have been created.";
$subfile = "APIChainedArray";
$params = array(
'first_name' => 'abc3',
}
public function testGetIndividualWithChainedArraysFormats() {
- $description = "/*this demonstrates the usage of chained api functions. A variety of return formats are used. Note that no notes
- *custom fields or memberships exist";
+ $description = "This demonstrates the usage of chained api functions.\nIn this case no notes or custom fields have been created.";
$subfile = "APIChainedArrayFormats";
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
$params['custom_' . $ids['custom_field_id']] = "custom string";
'title' => "another group",
'name' => 'another name',
));
- $description = "/*this demonstrates the usage of chained api functions. A variety of techniques are used";
+ $description = "This demonstrates the usage of chained api functions with multiple custom fields.";
$subfile = "APIChainedArrayMultipleCustom";
$params = array(
'first_name' => 'abc3',
* Test checks usage of $values to pick & choose inputs.
*/
public function testChainingValuesCreate() {
- $description = "/*this demonstrates the usage of chained api functions. Specifically it has one 'parent function' &
- 2 child functions - one receives values from the parent (Contact) and the other child (Tag). ";
+ $description = "This demonstrates the usage of chained api functions. Specifically it has one 'parent function' &
+ 2 child functions - one receives values from the parent (Contact) and the other child (Tag).";
$subfile = "APIChainedArrayValuesFromSiblingFunction";
$params = array(
'display_name' => 'batman',
public function testContactGetSingleEntityArray() {
$this->createContactFromXML();
$description = "This demonstrates use of the 'format.single_entity_array' param.
- /* This param causes the only contact to be returned as an array without the other levels.
- /* it will be ignored if there is not exactly 1 result";
+ This param causes the only contact to be returned as an array without the other levels.
+ It will be ignored if there is not exactly 1 result";
$subfile = "GetSingleContact";
$params = array('id' => 17);
$result = $this->callAPIAndDocument('Contact', 'GetSingle', $params, __FUNCTION__, __FILE__, $description, $subfile);
*/
public function testContactGetFormatCountOnly() {
$this->createContactFromXML();
- $description = "This demonstrates use of the 'getCount' action.\n"
- . " *\n"
- . " * This param causes the count of the only function to be returned as an integer.";
+ $description = "This demonstrates use of the 'getCount' action.
+ This param causes the count of the only function to be returned as an integer.";
$subfile = "GetCountContact";
$params = array('id' => 17);
$result = $this->callAPIAndDocument('Contact', 'GetCount', $params, __FUNCTION__, __FILE__, $description,
*/
public function testContactGetFormatIDOnly() {
$this->createContactFromXML();
- $description = "This demonstrates use of the 'format.id_only' param.\n" .
- " /* This param causes the id of the only entity to be returned as an integer." .
- " /* it will be ignored if there is not exactly 1 result";
+ $description = "This demonstrates use of the 'format.id_only' param.
+ This param causes the id of the only entity to be returned as an integer.
+ It will be ignored if there is not exactly 1 result";
$subfile = "FormatOnlyID";
$params = array('id' => 17, 'format.only_id' => 1);
$result = $this->callAPIAndDocument('Contact', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
public function testContactGetFormatSingleValue() {
$this->createContactFromXML();
$description = "This demonstrates use of the 'format.single_value' param.
- /* This param causes only a single value of the only entity to be returned as an string.
- /* it will be ignored if there is not exactly 1 result";
+ This param causes only a single value of the only entity to be returned as an string.
+ It will be ignored if there is not exactly 1 result";
$subFile = "FormatSingleValue";
$params = array('id' => 17, 'return' => 'display_name');
$result = $this->callAPIAndDocument('Contact', 'getvalue', $params, __FUNCTION__, __FILE__, $description, $subFile, 'getvalue');
),
);
- $description = "Create Contribution with Nested Line Items";
+ $description = "Create Contribution with Nested Line Items.";
$subfile = "CreateWithNestedLineItems";
$contribution = $this->callAPIAndDocument('contribution', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
* Test note created correctly.
*/
public function testCreateContributionWithNote() {
- $description = "Demonstrates creating contribution with Note Entity";
+ $description = "Demonstrates creating contribution with Note Entity.";
$subfile = "ContributionCreateWithNote";
$params = array(
'contact_id' => $this->_individualId,
* This is the test for creating soft credits.
*/
public function testCreateContributionWithSoftCredit() {
- $description = "Demonstrates creating contribution with SoftCredit";
+ $description = "Demonstrates creating contribution with SoftCredit.";
$subfile = "ContributionCreateWithSoftCredit";
$contact2 = $this->callAPISuccess('Contact', 'create', array(
'display_name' => 'superman',
}
public function testCreateContributionWithSoftCreditDefaults() {
- $description = "Demonstrates creating contribution with Soft Credit defaults for amount and type";
+ $description = "Demonstrates creating contribution with Soft Credit defaults for amount and type.";
$subfile = "ContributionCreateWithSoftCreditDefaults";
$contact2 = $this->callAPISuccess('Contact', 'create', array(
'display_name' => 'superman',
}
public function testCreateContributionWithHonoreeContact() {
- $description = "Demonstrates creating contribution with Soft Credit by passing in honor_contact_id";
+ $description = "Demonstrates creating contribution with Soft Credit by passing in honor_contact_id.";
$subfile = "ContributionCreateWithHonoreeContact";
$contact2 = $this->callAPISuccess('Contact', 'create', array(
'display_name' => 'superman',
'options' => array('get_options' => 'custom_' . $customField['id']),
'action' => 'create',
);
- $description = "Demonstrate retrieving metadata with custom field options";
+ $description = "Demonstrates retrieving metadata with custom field options.";
$subfile = "GetFieldsOptions";
$fields = $this->callAPIAndDocument('contact', 'getfields', $getFieldsParams, __FUNCTION__, 'ContactTest.php', $description, $subfile, 'GetFields');
$this->assertArrayHasKey('options', $fields['values']['custom_' . $customField['id']]);
$getOptionsArray = array(
'field' => 'custom_' . $customField['id'],
);
- $description = "Demonstrates retrieving options for a custom field";
+ $description = "Demonstrates retrieving options for a custom field.";
$subfile = "GetOptions";
$result = $this->callAPIAndDocument('contact', 'getoptions', $getOptionsArray, __FUNCTION__, 'ContactTest.php', $description, '', 'getoptions');
$this->assertEquals('Label1', $result['values'][1]);
public function testGetMultipleCustomValues() {
- $description = "/*this demonstrates the use of CustomValue get";
+ $description = "This demonstrates the use of CustomValue get to fetch single and multi-valued custom data.";
$params = array(
'first_name' => 'abc3',
));
$this->assertAPISuccess($get, 'In line ' . __LINE__);
$this->assertEquals(0, $get['count'], 'email already exists ' . __LINE__);
- $description = "example demonstrates use of Replace in a nested API call";
+ $description = "Demonstrates use of Replace in a nested API call.";
$subfile = "NestedReplaceEmail";
// initialize email list with three emails at loc #1 and two emails at loc #2
$getReplace1Params = array(
);
$currentEventParams = array_merge($this->_params[1], $currentEventParams);
$currentEvent = $this->callAPISuccess('Event', 'Create', $currentEventParams);
- $description = "demonstrates use of is.Current option";
+ $description = "Demonstrates use of is.Current option.";
$subfile = "IsCurrentOption";
$result = $this->callAPIAndDocument('Event', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
$allEvents = $this->callAPISuccess('Event', 'Get', array());
);
$currentEvent = $this->callAPISuccess('Event', 'getsingle', $getEventParams);
- $description = "demonstrates use of return is_full ";
+ $description = "Demonstrates use of return is_full .";
$subfile = "IsFullOption";
$this->assertEquals(0, $currentEvent['is_full'], ' is full is set in line ' . __LINE__);
$this->assertEquals(1, $currentEvent['available_places'], 'available places is set in line ' . __LINE__);
}
public function testgetfields() {
- $description = "demonstrate use of getfields to interrogate api";
+ $description = "Demonstrate use of getfields to interrogate api.";
$params = array('action' => 'create');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__);
* Test api_action param also works.
*/
public function testgetfieldsRest() {
- $description = "demonstrate use of getfields to interrogate api";
+ $description = "Demonstrate use of getfields to interrogate api.";
$params = array('api_action' => 'create');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__);
}
public function testgetfieldsGet() {
- $description = "demonstrate use of getfields to interrogate api";
+ $description = "Demonstrate use of getfields to interrogate api.";
$params = array('action' => 'get');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals('title', $result['values']['event_title']['name'], 'in line ' . __LINE__);
}
public function testgetfieldsDelete() {
- $description = "demonstrate use of getfields to interrogate api";
+ $description = "Demonstrate use of getfields to interrogate api.";
$params = array('action' => 'delete');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals(1, $result['values']['id']['api.required']);
}
public function testGetGroupID() {
- $description = "Get all from group and display contacts";
+ $description = "Get all from group and display contacts.";
$subfile = "GetWithGroupID";
$params = array(
'group_id' => $this->_groupId1,
}
public function testgetfields() {
- $description = "demonstrate use of getfields to interrogate api";
+ $description = "Demonstrate use of getfields to interrogate api.";
$params = array('action' => 'create');
$result = $this->callAPIAndDocument('group', 'getfields', $params, __FUNCTION__, __FILE__, $description, 'getfields', 'getfields');
$this->assertEquals(1, $result['values']['is_active']['api.default']);
'street_address' => '987654321',
),
);
- $description = "Create entities and locBlock in 1 api call";
+ $description = "Create entities and locBlock in 1 api call.";
$result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__, $description, 'createEntities');
$id = $result['id'];
$this->assertEquals(1, $result['count']);
* Test chained delete.
*/
public function testGetMailSettingsChainDelete() {
- $description = "demonstrates get + delete in the same call";
+ $description = "Demonstrates get + delete in the same call.";
$subFile = 'ChainedGetDelete';
$params = array(
'title' => "MailSettings title",
* Memberships expected.
*/
public function testGetOnlyActive() {
- $description = "Demonstrates use of 'filter' active_only' param";
+ $description = "Demonstrates use of 'filter' active_only' param.";
$this->_membershipID = $this->contactMembershipCreate($this->_params);
$subfile = 'filterIsCurrent';
$params = array(
* Test offset param.
*/
public function testGetSingleValueOptionValueSort() {
- $description = "demonstrates use of Sort param (available in many api functions). Also, getsingle";
+ $description = "Demonstrates use of Sort param (available in many api functions). Also, getsingle.";
$subfile = 'SortOption';
$result = $this->callAPISuccess('option_value', 'getsingle', array(
'option_group_id' => 1,
'contact_id' => $this->_contactID,
));
- $description = "use nested get to get an event";
+ $description = "Demonstrates use of nested get to fetch event data with participant records.";
$subfile = "NestedEventGet";
$params = array(
'id' => $this->_participantID,
* Delete with a get - a 'criteria delete'
*/
public function testNestedDelete() {
- $description = "Criteria delete by nesting a GET & a DELETE";
+ $description = "Criteria delete by nesting a GET & a DELETE.";
$subfile = "NestedDelete";
$participants = $this->callAPISuccess('Participant', 'Get', array());
$this->assertEquals($participants['count'], 3);
* Test creation of a participant with an associated contribution.
*/
public function testCreateParticipantWithPayment() {
- $description = "single function to create contact w partipation & contribution. Note that in the
- case of 'contribution' the 'create' is implied (api.contribution.create)";
+ $description = "Single function to create contact with partipation & contribution.
+ Note that in the case of 'contribution' the 'create' is implied (api.contribution.create)";
$subfile = "CreateParticipantPayment";
$params = array(
'contact_type' => 'Individual',
$getParams = array(
'filters' => array('is_current' => 1),
);
- $description = "demonstrates is_current filter";
+ $description = "Demonstrates is_current filter.";
$subfile = 'filterIsCurrent';
//no relationship has been created
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
'relationship_type_id' => array('IN' => array($relationType2, $relationType3)),
);
- $description = "demonstrates use of IN filter";
+ $description = "Demonstrates use of IN filter.";
$subfile = 'INRelationshipType';
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals($result['count'], 2);
$this->AssertEquals(array($rel2['id'], $rel3['id']), array_keys($result['values']));
- $description = "demonstrates use of NOT IN filter";
+ $description = "Demonstrates use of NOT IN filter.";
$subfile = 'NotInRelationshipType';
$getParams = array(
'relationship_type_id' => array('NOT IN' => array($relationType2, $relationType3)),
$this->assertEquals($result['count'], 2);
$this->AssertEquals(array($rel1['id'], $rel4['id']), array_keys($result['values']));
- $description = "demonstrates use of BETWEEN filter";
+ $description = "Demonstrates use of BETWEEN filter.";
$subfile = 'BetweenRelationshipType';
$getParams = array(
'relationship_type_id' => array('BETWEEN' => array($relationType2, $relationType4)),
$this->assertEquals($result['count'], 3);
$this->AssertEquals(array($rel2['id'], $rel3['id'], $rel4['id']), array_keys($result['values']));
- $description = "demonstrates use of Not BETWEEN filter";
+ $description = "Demonstrates use of Not BETWEEN filter.";
$subfile = 'NotBetweenRelationshipType';
$getParams = array(
'relationship_type_id' => array('NOT BETWEEN' => array($relationType2, $relationType4)),
* Test getrows on contact summary report.
*/
public function testReportTemplateGetRowsContactSummary() {
- $description = "Retrieve rows from a report template (optionally providing the instance_id)";
+ $description = "Retrieve rows from a report template (optionally providing the instance_id).";
$result = $this->callAPIAndDocument('report_template', 'getrows', array(
'report_id' => 'contact/summary',
'options' => array('metadata' => array('labels', 'title')),
if (in_array($reportID, array('contribute/softcredit', 'contribute/bookkeeping'))) {
$this->markTestIncomplete($reportID . " has non enotices when calling statistics fn");
}
- $description = "Get Statistics from a report (note there isn't much data to get in the test DB :-(";
+ $description = "Get Statistics from a report (note there isn't much data to get in the test DB).";
$result = $this->callAPIAndDocument('report_template', 'getstatistics', array(
'report_id' => $reportID,
), __FUNCTION__, __FILE__, $description, 'Getstatistics', 'getstatistics');
* Check getfields works.
*/
public function testCreateSetting() {
- $description = "shows setting a variable for a given domain - if no domain is set current is assumed";
+ $description = "Shows setting a variable for a given domain - if no domain is set current is assumed.";
$params = array(
'domain_id' => $this->_domainID2,
$result = $this->callAPIAndDocument('setting', 'create', $params, __FUNCTION__, __FILE__);
$params = array('uniq_email_per_site' => 1);
- $description = "shows setting a variable for a current domain";
+ $description = "Shows setting a variable for a current domain.";
$result = $this->callAPIAndDocument('setting', 'create', $params, __FUNCTION__, __FILE__, $description, 'CreateSettingCurrentDomain');
$this->assertArrayHasKey(CRM_Core_Config::domainID(), $result['values']);
}
* Check getfields works.
*/
public function testCreateSettingMultipleDomains() {
- $description = "shows setting a variable for all domains";
+ $description = "Shows setting a variable for all domains.";
$params = array(
'domain_id' => 'all',
'return' => 'uniq_email_per_site',
);
// we'll check it with a 'get'
- $description = "shows getting a variable for all domains";
+ $description = "Shows getting a variable for all domains.";
$result = $this->callAPIAndDocument('setting', 'get', $params, __FUNCTION__, __FILE__, $description, 'GetAllDomains', 'Get');
$this->assertEquals(1, $result['values'][2]['uniq_email_per_site']);
'domain_id' => array(1, 3),
'uniq_email_per_site' => 0,
);
- $description = "shows setting a variable for specified domains";
+ $description = "Shows setting a variable for specified domains.";
$result = $this->callAPIAndDocument('setting', 'create', $params, __FUNCTION__, __FILE__, $description, 'CreateSpecifiedDomains');
$this->assertEquals(0, $result['values'][3]['uniq_email_per_site']);
'domain_id' => array(1, 2),
'return' => array('uniq_email_per_site'),
);
- $description = "shows getting a variable for specified domains";
+ $description = "Shows getting a variable for specified domains.";
$result = $this->callAPIAndDocument('setting', 'get', $params, __FUNCTION__, __FILE__, $description, 'GetSpecifiedDomains', 'Get');
$this->assertEquals(1, $result['values'][2]['uniq_email_per_site']);
$this->assertEquals(0, $result['values'][1]['uniq_email_per_site']);
'domain_id' => $this->_domainID2,
'return' => 'uniq_email_per_site',
);
- $description = "shows get setting a variable for a given domain - if no domain is set current is assumed";
+ $description = "Shows get setting a variable for a given domain - if no domain is set current is assumed.";
$result = $this->callAPIAndDocument('setting', 'get', $params, __FUNCTION__, __FILE__);
$params = array(
'return' => 'uniq_email_per_site',
);
- $description = "shows getting a variable for a current domain";
+ $description = "Shows getting a variable for a current domain.";
$result = $this->callAPIAndDocument('setting', 'get', $params, __FUNCTION__, __FILE__, $description, 'GetSettingCurrentDomain');
$this->assertArrayHasKey(CRM_Core_Config::domainID(), $result['values']);
}
'name' => 'petition_contacts',
'group' => 'Campaign Preferences',
);
- $description = "Demonstrates getvalue action - intended for runtime use as better caching than get";
+ $description = "Demonstrates getvalue action - intended for runtime use as better caching than get.";
$result = $this->callAPIAndDocument('setting', 'getvalue', $params, __FUNCTION__, __FILE__, $description);
$this->assertEquals('Petition Contacts', $result);
}
public function testGetDefaults() {
- $description = "gets defaults setting a variable for a given domain - if no domain is set current is assumed";
+ $description = "Gets defaults setting a variable for a given domain - if no domain is set current is assumed.";
$params = array(
'name' => 'address_format',
$result = $this->callAPISuccess('setting', 'get', $params);
//make sure it's set
$this->assertEquals('xyz', $result['values'][CRM_Core_Config::domainID()]['address_format']);
- $description = "Demonstrates reverting a parameter to default value";
+ $description = "Demonstrates reverting a parameter to default value.";
$result = $this->callAPIAndDocument('setting', 'revert', $revertParams, __FUNCTION__, __FILE__, $description, '', 'revert');
//make sure it's reverted
$result = $this->callAPISuccess('setting', 'get', $params);
* test generated examples. (these are to be found in the api/examples folder).
*/
public function testGetSurveyChainDelete() {
- $description = "demonstrates get + delete in the same call";
+ $description = "Demonstrates get + delete in the same call.";
$subfile = 'ChainedGetDelete';
$params = array(
'title' => "survey title",
* Test civicrm_tag_get - success expected.
*/
public function testGetReturnArray() {
- $description = "demonstrates use of Return as an array";
+ $description = "Demonstrates use of Return as an array.";
$subfile = "getReturnArray";
$params = array(
}
public function testTagGetfields() {
- $description = "demonstrate use of getfields to interrogate api";
+ $description = "Demonstrate use of getfields to interrogate api.";
$params = array('action' => 'create');
$result = $this->callAPIAndDocument('tag', 'getfields', $params, __FUNCTION__, __FILE__, $description, NULL, 'getfields');
$this->assertEquals('civicrm_contact', $result['values']['used_for']['api.default']);
}
public function testTagGetList() {
- $description = "Demonstrates use of api.getlist for autocomplete and quicksearch applications";
+ $description = "Demonstrates use of api.getlist for autocomplete and quicksearch applications.";
$params = array(
'input' => $this->tag['name'],
'extra' => array('used_for'),
),
);
- $description = "Create Contribution with Nested Line Items";
+ $description = "Create Contribution with Nested Line Items.";
$subfile = "CreateWithNestedLineItems";
$contribution = $this->callAPIAndDocument('contribution', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
{/if}
{/if}
{if $description}
- * {$description}
+{foreach from=$description item='line'}
+ * {$line}
+{/foreach}
*
{/if}
* @return array