class api_v3_CustomFieldTest extends CiviUnitTestCase {
protected $_apiversion;
+ /**
+ * @return array
+ */
function get_info() {
return array(
'name' => 'Custom Field Create',
/*
* Can't figure out the point of this?
*/
+ /**
+ * @param $params
+ */
function _loopingCustomFieldCreateTest($params) {
$customField = $this->callAPISuccess('custom_field', 'create', $params);
$this->assertNotNull($customField['id']);
$this->getAndCheck($params, $customField['id'], 'CustomField');
}
+ /**
+ * @param $gid
+ * @param $htype
+ * @param $dtype
+ *
+ * @return array
+ */
function _buildParams($gid, $htype, $dtype) {
$params = $this->_buildBasicParams($gid, $htype, $dtype);
/* //Not Working for any type. Maybe redundant with testCustomFieldCreateWithOptionValues()
return $params;
}
+ /**
+ * @param $gid
+ * @param $htype
+ * @param $dtype
+ *
+ * @return array
+ */
function _buildBasicParams($gid, $htype, $dtype) {
return array(
'custom_group_id' => $gid,
}
}
+ /**
+ * @param $getFieldsResult
+ *
+ * @return array
+ */
function getCustomFieldKeys($getFieldsResult) {
$isCustom = function($key) {
return preg_match('/^custom_/', $key);