+++ /dev/null
-<?php
-// vim: set si ai expandtab tabstop=4 shiftwidth=4 softtabstop=4:
-
-/**
- * File to v3 APIs for Standards compliance
- *
- * (PHP 5)
- *
- * @copyright Copyright CiviCRM LLC (C) 2009
- * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html
- * GNU Affero General Public License version 3
- * @version $Id:
- * @package CiviCRM
- *
- * This file is part of CiviCRM
- *
- * CiviCRM is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * CiviCRM is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Include class definitions
- */
-require_once 'CiviTest/CiviUnitTestCase.php';
-
-/**
- * Test APIv3 civicrm_activity_* functions
- *
- * @package CiviCRM_APIv3
- * @todo determine where help functions should sit (here or 'up the tree'), & best way to define API dir
- */
-class api_v3_APIStandardsTest extends CiviUnitTestCase {
-
- protected $_apiversion;
- protected $_apiDir;
- protected $_functionFiles;
- protected $_regexForGettingAPIStdFunctions;
- /* This test case doesn't require DB reset */
-
-
- public $DBResetRequired = FALSE;
-
- /**
- * Test setup for every test
- *
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
- */
- public function setUp() {
- // Connect to the database
- parent::setUp();
- $this->useTransaction(TRUE);
- $this->_apiversion = 3;
- $this->_apiDir = "../api/v3/";
- $this->_functionFiles = array('Entity.php', 'utils.php');
-
- //should possibly insert variable rather than '3' in below
- $this->_regexForGettingAPIStdFunctions = '/^civicrm_api3_ #starts with civicrm_api_3 (ignore internal functions)
- .*_ #any number of characters up to the last _
- # negative look ahead on string getfields
- (?:(?!getfields))/x';
- // functions to skip from utils.php mainly since they get sucked in via
- // a require chain in the include files
- $this->_skipFunctionList = array(
- // location api is deprecated
- 'civicrm_api3_location_create',
- 'civicrm_api3_location_get',
- 'civicrm_api3_location_delete',
- // most of these seem to be internal functions
- 'civicrm_api3_entity_create',
- 'civicrm_api3_entity_delete',
- 'civicrm_api3_survey_respondant_count',
- // functions from utils.php
- 'civicrm_api3_verify_one_mandatory',
- 'civicrm_api3_verify_mandatory',
- 'civicrm_api3_get_dao',
- 'civicrm_api3_create_success',
- 'civicrm_api3_create_error',
- 'civicrm_api3_error',
- 'civicrm_api3_check_contact_dedupe',
- 'civicrm_api3_api_check_permission',
- );
- }
-
- /**
- * Test checks that all v3 API return a standardised error message when
- * the $params passed in is not an array.
- */
- public function testParamsNotArray() {
- /* @codingStandardsIgnoreStart
- * I have commented this out as the check for is_array has been moved to civicrm_api. But keeping in place as
- * this test, in contrast to the standards test, tests all existing API rather than just CRUD ones
- * so want to keep code for re-use
- $files = $this->getAllFilesinAPIDir();
- $this->assertGreaterThan(1, count($files),"something has gone wrong listing the files in line " . __LINE__);
- $this->requireOnceFilesArray($files);
- $apiStdFunctions = $this->getAllAPIStdFunctions();
- $this->assertGreaterThan(1, count($apiStdFunctions),"something has gone wrong getting the std functions in line " . __LINE__);
- $params = 'string';
- foreach ($apiStdFunctions as $key => $function) {
- if ( in_array( $function, $this->_skipFunctionList ) ) {
- continue;
- }
- try {
- $result = $function($params);
- }
- catch ( Exception $e ) {
- continue;
- }
-
- }
- @codingStandardsIgnoreEnd */
- }
-
- /**
- * Get all the files in the API directory for the relevant version which contain API functions
- * @return array
- * array of php files in the directory excluding helper files
- */
- public function getAllFilesinAPIDir() {
- $files = array();
- $handle = opendir($this->_apiDir);
-
- while (($file = readdir($handle)) !== FALSE) {
- if (strstr($file, ".php") &&
- $file != 'Entity.php' &&
- $file != 'Generic.php' &&
- $file != 'utils.php'
- ) {
- $files[] = $file;
- }
- }
-
- closedir($handle);
- return $files;
- }
-
- /**
- * Require once Files
- * @param array $files
- * list of files to load.
- */
- public function requireOnceFilesArray($files) {
- foreach ($files as $key => $file) {
- require_once $this->_apiDir . $file;
- }
- }
-
- /**
- * Get all api exposed functions that are expected to conform to standards
- * @return array
- */
- public function getAllAPIStdFunctions() {
- $functionlist = get_defined_functions();
- $functions = preg_grep($this->_regexForGettingAPIStdFunctions, $functionlist['user']);
- foreach ($functions as $key => $function) {
- if (stristr($function, 'getfields')) {
- unset($functions[$key]);
- }
- if (stristr($function, '_generic_')) {
- unset($functions[$key]);
- }
- }
- return $functions;
- }
-
-}
}
/**
- * test that error doesn't occur for non-existant file
+ * Test that error doesn't occur for non-existent file.
*/
public function testAPIWrapperIncludeNoFile() {
-
- $result = $this->callAPIFailure('RandomFile', 'get', array(), 'API (RandomFile,get) does not exist (join the API team and implement it!)');
+ $this->callAPIFailure(
+ 'RandomFile',
+ 'get',
+ array(),
+ 'API (RandomFile,get) does not exist (join the API team and implement it!)'
+ );
}
public function testAPIWrapperCamelCaseFunction() {
}
/**
- * Test that calling via wrapper works
+ * Test that calling via wrapper works.
*/
public function testv3Wrapper() {
try {
}
/**
- * Test exception is thrown
+ * Test exception is thrown.
*/
- public function testv3WrapperException() {
+ public function testV3WrapperException() {
try {
- $result = civicrm_api3('contact', 'create', array('debug' => 1));
+ civicrm_api3('contact', 'create', array('debug' => 1));
}
catch (CiviCRM_API3_Exception $e) {
$this->assertEquals('mandatory_missing', $e->getErrorCode());
$this->fail('Exception was expected');
}
- public function testCreate_NoStringNullResult() {
+ /**
+ * Test result parsing for null.
+ */
+ public function testCreateNoStringNullResult() {
// create an example contact
// $contact = CRM_Core_DAO::createTestObject('CRM_Contribute_DAO_ContributionPage')->toArray();
$result = $this->callAPISuccess('ContributionPage', 'create', array(
'currency' => '',
));
- // check return format
+ // Check return format.
$this->assertEquals(1, $result['count']);
foreach ($result['values'] as $resultValue) {
$this->assertEquals('New title', $resultValue['title']);
- $this->assertEquals('', $resultValue['currency']); // BUG: $resultValue['location'] === 'null'
+ // BUG: $resultValue['location'] === 'null'.
+ $this->assertEquals('', $resultValue['currency']);
}
}
<?php
/**
+ * @file
* File for the TestActivity class
*
* (PHP 5)
/**
- * Test APIv3 civicrm_activity_* functions
+ * Test APIv3 civicrm_activity_* functions
*
* @package CiviCRM_APIv3
* @subpackage API_Activity
protected $_contactID;
/**
- * Test setup for every test.
+ * Test setup for every test.
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
// Connect to the database
}
/**
- * Test civicrm_activity_create() with mismatched activity_type_id
- * and activity_name
+ * Test civicrm_activity_create() with mismatched activity_type_id
+ * and activity_name.
*/
public function testActivityCreateMismatchNameType() {
$params = array(
}
/**
- * Test civicrm_activity_id() with missing source_contact_id is put with the current user.
+ * Test civicrm_activity_id() with missing source_contact_id is put with the current user.
*/
public function testActivityCreateWithMissingContactId() {
$params = array(
'activity_name' => 'Test activity type',
);
- $result = $this->callAPISuccess('activity', 'create', $params);
+ $this->callAPISuccess('activity', 'create', $params);
}
/**
- * Test civicrm_activity_id() with non-numeric source_contact_id.
+ * Test civicrm_activity_id() with non-numeric source_contact_id.
*/
public function testActivityCreateWithNonNumericContactId() {
$params = array(
}
/**
- * Test civicrm_activity_create() with valid parameters - use type_id.
+ * Test civicrm_activity_create() with valid parameters - use type_id.
*/
public function testActivityCreateCampaignTypeID() {
$this->enableCiviCampaign();
}
/**
- * Test civicrm_activity_create() with valid parameters and custom data.
+ * Test civicrm_activity_create() with valid parameters and custom data.
*/
public function testActivityCreateCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Test civicrm_activity_create() with valid parameters and custom data.
+ * Test civicrm_activity_create() with valid parameters and custom data.
*/
public function testActivityCreateCustomContactRefField() {
}
/**
- * Test civicrm_activity_get() with no params
+ * Test civicrm_activity_get() with no params
*/
public function testActivityGetEmpty() {
$result = $this->callAPISuccess('activity', 'get', array());
}
/**
- * Test civicrm_activity_get() with a good activity ID
+ * Test civicrm_activity_get() with a good activity ID
*/
public function testActivityGetGoodID1() {
// Insert rows in civicrm_activity creating activities 4 and
/**
- * Test civicrm_activity_get() with filter target_contact_id
+ * Test civicrm_activity_get() with filter target_contact_id
*/
public function testActivityGetTargetFilter() {
$params = $this->_params;
}
/**
- * Test civicrm_activity_get() with a good activity ID which
- * has associated custom data
+ * Test civicrm_activity_get() with a good activity ID which
+ * has associated custom data
*/
public function testActivityGetGoodIDCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Test civicrm_activity_get() with a good activity ID which
- * has associated custom data
+ * Test civicrm_activity_get() with a good activity ID which
+ * has associated custom data
*/
public function testActivityGetContact_idCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Test civicrm_activity_update() to update an existing activity
+ * Test civicrm_activity_update() to update an existing activity
*/
public function testActivityUpdate() {
$result = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Test civicrm_activity_update() with valid parameters
- * and some custom data
+ * Test civicrm_activity_update() with valid parameters
+ * and some custom data
*/
public function testActivityUpdateCustom() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
/**
- * Test civicrm_activity_update() for core activity fields
- * and some custom data
+ * Test civicrm_activity_update() for core activity fields
+ * and some custom data
*/
public function testActivityUpdateCheckCoreFields() {
$params = $this->_params;
}
/**
- * Test civicrm_activity_update() where the DB has a date_time
- * value and there is none in the update params.
+ * Test civicrm_activity_update() where the DB has a date_time
+ * value and there is none in the update params.
*/
public function testActivityUpdateNotDate() {
$result = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Test civicrm_activity_update() where the source_contact_id
- * is not in the update params.
+ * Test civicrm_activity_update() where the source_contact_id
+ * is not in the update params.
*/
public function testActivityUpdateKeepSource() {
$activity = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Test civicrm_activities_contact_get()
+ * Test civicrm_activities_contact_get()
*/
public function testActivitiesContactGet() {
$activity = $this->callAPISuccess('activity', 'create', $this->_params);
}
/**
- * Test civicrm_activity_type_get()
+ * Test civicrm_activity_type_get().
*/
public function testActivityTypeGet() {
$params = array();
}
/**
- * Test civicrm_activity_type_create()
+ * Test civicrm_activity_type_create().
*/
public function testActivityTypeCreate() {
$params = array(
}
/**
- * Test civicrm_activity_type_create - check id
+ * Test civicrm_activity_type_create - check id
*/
public function testActivityTypecreatecheckId() {
$params = array(
}
/**
- * Test civicrm_activity_type_delete()
+ * Test civicrm_activity_type_delete()
*/
public function testActivityTypeDelete() {
$params = array(
}
/**
- * Build test suite dynamically
+ * Build test suite dynamically
*/
public static function suite() {
$inst = self::getInstance();
}
/**
- * Create a sample batch
+ * Create a sample batch.
*/
public function batchCreate() {
$params = $this->_params;
}
/**
- * Test civicrm_batch_delete using the new $params['id'] syntax
+ * Test civicrm_batch_delete using the new $params['id'] syntax.
*/
public function testBatchDeleteCorrectSyntax() {
$batchID = $this->batchCreate();
class api_v3_CRM11793Test extends CiviUnitTestCase {
/**
- * Test setup for every test
+ * Test setup for every test
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
// Connect to the database
}
/**
- * Test civicrm_contact_create
+ * Test civicrm_contact_create
*
- * Verify that attempt to create individual contact with only
- * first and last names succeeds
+ * Verify that attempt to create individual contact with only
+ * first and last names succeeds
*/
public function testCRM11793Organization() {
$this->_testCRM11793ContactType('Organization');
protected $followup_activity_type_value;
/**
- * Test setup for every test
+ * Test setup for every test
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
$this->_entity = 'case';
}
/**
- * Test activity api create for case activities
+ * Test activity api create for case activities
*/
public function testCaseActivityCreate() {
// Create a case first
}
/**
- * Test activity api update for case activities
+ * Test activity api update for case activities
*/
public function testCaseActivityUpdate() {
// Need to create the case and activity before we can update it
protected $_apiversion = 3;
/**
- * Test setup for every test
+ * Test setup for every test
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
// Connect to the database
}
/**
- * Test civicrm_constant_get( ) for unknown constant
+ * Test civicrm_constant_get( ) for unknown constant
*/
public function testUnknownConstant() {
$result = $this->callAPIFailure('constant', 'get', array(
}
/**
- * Test civicrm_constant_get( 'activityStatus' )
+ * Test civicrm_constant_get( 'activityStatus' )
*/
public function testActivityStatus() {
}
/**
- * Test civicrm_constant_get( 'activityType' )
+ * Test civicrm_constant_get( 'activityType' )
*/
public function testActivityType() {
}
/**
- * Test civicrm_address_getoptions( 'location_type_id' )
+ * Test civicrm_address_getoptions( 'location_type_id' )
*/
public function testLocationTypeGet() {
// needed to get rid of cached values from previous tests
}
/**
- * Test civicrm_phone_getoptions( 'phone_type_id' )
+ * Test civicrm_phone_getoptions( 'phone_type_id' )
*/
public function testPhoneType() {
$params = array(
}
/**
- * Test civicrm_constant_get( 'mailProtocol' )
+ * Test civicrm_constant_get( 'mailProtocol' )
*/
public function testmailProtocol() {
$params = array(
/**
* Test setup for every test.
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
// Connect to the database.
* Test old keys still work.
*
* Verify that attempt to create individual contact with
- * first and last names and old key values works
+ * first and last names and old key values works
*/
public function testCreateNameIndividualOldKeys() {
$params = array(
* Test preferred keys work.
*
* Verify that attempt to create individual contact with
- * first and last names and old key values works
+ * first and last names and old key values works
*/
public function testCreateNameIndividualRecommendedKeys2() {
$params = array(
* Test household name is sufficient for create.
*
* Verify that attempt to create household contact with only
- * household name succeeds
+ * household name succeeds
*/
public function testCreateNameHousehold() {
$params = array(
* Test organization name is sufficient for create.
*
* Verify that attempt to create organization contact with only
- * organization name succeeds.
+ * organization name succeeds.
*/
public function testCreateNameOrganization() {
$params = array(
/**
* Verify that attempt to create individual contact with first
- * and last names and email succeeds
+ * and last names and email succeeds
*/
public function testCreateIndividualWithNameEmail() {
$params = array(
/**
* Verify that attempt to create individual contact with first
- * and last names, email and location type succeeds
+ * and last names, email and location type succeeds
*/
public function testCreateIndividualWithNameEmailLocationType() {
$params = array(
/**
* Verify that attempt to create household contact with details
- * succeeds
+ * succeeds
*/
public function testCreateHouseholdDetails() {
$params = array(
/**
* Test civicrm_contact_get() return only first name & last name.
*
- * Use comma separated string return without a space
+ * Use comma separated string return without a space
*/
public function testContactGetReturnFirstLastNoComma() {
$contact = $this->callAPISuccess('contact', 'create', $this->_params);
/**
* Test birth date params incl value, array & birth_date_high, birth_date_low
- * && deceased
+ * && deceased
*/
public function testContactGetBirthDate() {
$contact1 = $this->callAPISuccess('contact', 'create', array_merge($this->_params, array('birth_date' => 'first day of next month - 2 years')));
/**
* Test Deceased date params incl value, array & Deceased_date_high, Deceased date_low
- * && deceased.
+ * && deceased.
*/
public function testContactGetDeceasedDate() {
$contact1 = $this->callAPISuccess('contact', 'create', array_merge($this->_params, array('deceased_date' => 'first day of next month - 2 years')));
}
/**
- * civicrm_contribution_soft_delete methods
+ * civicrm_contribution_soft_delete methods
*
*/
public function testDeleteEmptyParamsContributionSoft() {
///////////////// civicrm_contribution_search methods
/**
- * Test civicrm_contribution_search with empty params.
- * All available contributions expected.
+ * Test civicrm_contribution_search with empty params.
+ * All available contributions expected.
*/
public function testSearchEmptyParams() {
$p = array(
}
/**
- * Test civicrm_contribution_soft_search. Success expected.
+ * Test civicrm_contribution_soft_search. Success expected.
*/
public function testSearch() {
$p1 = array(
}
/**
- * Test civicrm_contribution_search with empty params.
- * All available contributions expected.
+ * Test civicrm_contribution_search with empty params.
+ * All available contributions expected.
*/
public function testSearchEmptyParams() {
$params = array();
}
/**
- * Test civicrm_contribution_search. Success expected.
+ * Test civicrm_contribution_search. Success expected.
*/
public function testSearch() {
$p1 = array(
}
/**
- * Test using example code
+ * Test using example code
*/
/*function testCustomFieldCreateExample( )
{
protected $_apiversion = 3;
/**
- * Test setup for every test
+ * Test setup for every test
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
// Connect to the database
protected $_apiversion = 3;
/**
- * Test setup for every test
+ * Test setup for every test
*
- * Connect to the database, truncate the tables that will be used
- * and redirect stdin to a temporary file
+ * Connect to the database, truncate the tables that will be used
+ * and redirect stdin to a temporary file
*/
public function setUp() {
// Connect to the database
///////////////// civicrm_event_search methods
/**
- * Test civicrm_event_search with wrong params type
+ * Test civicrm_event_search with wrong params type
*/
public function testSearchWrongParamsType() {
$params = 'a string';
}
/**
- * Test civicrm_event_search with empty params
+ * Test civicrm_event_search with empty params.
*/
public function testSearchEmptyParams() {
- $event = $this->callAPISuccess('event', 'create', $this->_params[1]);
+ $this->callAPISuccess('event', 'create', $this->_params[1]);
- $getparams = array(
+ $getParams = array(
'sequential' => 1,
);
- $result = $this->callAPISuccess('event', 'get', $getparams);
- $this->assertEquals($result['count'], 3, 'In line ' . __LINE__);
+ $result = $this->callAPISuccess('event', 'get', $getParams);
+ $this->assertEquals($result['count'], 3);
$res = $result['values'][0];
- $this->assertArrayKeyExists('title', $res, 'In line ' . __LINE__);
- $this->assertEquals($res['event_type_id'], $this->_params[1]['event_type_id'], 'In line ' . __LINE__);
+ $this->assertArrayKeyExists('title', $res);
+ $this->assertEquals($res['event_type_id'], $this->_params[1]['event_type_id']);
}
/**
- * Test civicrm_event_search. Success expected.
+ * Test civicrm_event_search. Success expected.
*/
public function testSearch() {
$params = array(
}
/**
- * Test civicrm_event_search. Success expected.
- * return.offset and return.max_results test (CRM-5266)
+ * Test civicrm_event_search. Success expected.
+ * return.offset and return.max_results test (CRM-5266)
*/
public function testSearchWithOffsetAndMaxResults() {
$maxEvents = 5;
///////////////// civicrm_group_organization_remove methods
/**
- * Test civicrm_group_organization_remove with params not an array.
+ * Test civicrm_group_organization_remove with params not an array.
*/
public function testGroupOrganizationDeleteParamsNotArray() {
$params = 'delete';
}
/**
- * Test civicrm_group_organization_remove with valid params.
+ * Test civicrm_group_organization_remove with valid params.
*/
public function testGroupOrganizationDelete() {
$paramsC = array(
}
/**
- * Test civicrm_group_organization_remove with invalid params key.
+ * Test civicrm_group_organization_remove with invalid params key.
*/
public function testGroupOrganizationDeleteWithInvalidKey() {
$paramsDelete = array(
/**
- * Test civicrm_membership_status_get with empty params
+ * Test civicrm_membership_status_get with empty params
*/
public function testGetEmptyParams() {
$result = $this->callAPISuccess('membership_status', 'get', array());
}
/**
- * Test civicrm_membership_status_get. Success expected.
+ * Test civicrm_membership_status_get. Success expected.
*/
public function testGet() {
$params = array(
}
/**
- * Test civicrm_membership_status_get. Success expected.
+ * Test civicrm_membership_status_get. Success expected.
*/
public function testGetLimit() {
$result = $this->callAPISuccess('membership_status', 'get', array());
/**
* Test correct end and start dates are calculated for fixed multi year memberships.
*
- * The empty start date is calculated to be the start_date (1 Nov prior to the join_date - so 1 Nov 14)
+ * The empty start date is calculated to be the start_date (1 Nov prior to the join_date - so 1 Nov 14)
*
* In this set our start date is after the start day and after the rollover day so we do get an extra year
* and we end one day before the rollover day. Start day is 1 Nov so we end on 31 Oct
/**
* Test correct end and start dates are calculated for fixed multi year memberships.
*
- * The empty start date is calculated to be the start_date (1 Nov prior to the join_date - so 1 Nov 14)
+ * The empty start date is calculated to be the start_date (1 Nov prior to the join_date - so 1 Nov 14)
*
* The empty start date is calculated to be the start_date (1 Nov prior to the join_date - so 1 Nov 14)
* In this set our join date is after the start day and after the rollover day so we do get an extra year
}
/**
- * Test limit param
+ * Test limit param
*/
public function testGetOptionValueLimit() {
$params = array();
}
/**
- * Test offset param
+ * Test offset param
*/
public function testGetOptionValueOffSet() {
}
/**
- * Test offset param
+ * Test offset param
*/
public function testGetSingleValueOptionValueSort() {
$description = "demonstrates use of Sort param (available in many api functions). Also, getsingle";
}
/**
- * Test using example code
+ * Test using example code
*/
public function testPaymentProcessorTypeCreateExample() {
require_once 'api/v3/examples/PaymentProcessorType/Create.php';
}
/**
- * Test using example code
+ * Test using example code
*/
public function testRelationshipTypeCreateExample() {
require_once 'api/v3/examples/RelationshipType/Create.php';
}
/**
- * Test civicrm_activity_create() using example code
+ * Test civicrm_activity_create() using example code.
*/
public function testUFJoinCreateExample() {
require_once 'api/v3/examples/UFJoin/Create.php';
}
/**
- * Test civicrm_activity_create() using example code
+ * Test civicrm_activity_create() using example code
*/
public function testUFMatchGetExample() {
require_once 'api/v3/examples/UFMatch/Get.php';