<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testCustomDataImport() {
+ public function testCustomDataImport() {
$this->webtestLogin();
$firstName1 = 'Ma_' . substr(sha1(rand()), 0, 7);
}
}
- /*
- * Helper function to provide data for custom data import.
- */
/**
+ * Helper function to provide data for custom data import.
+ *
* @param $customGroupTitle
- * @param $firstName1
- * @param $firstName2
+ * @param string $firstName1
+ * @param string $firstName2
* @param $id1
* @param $id2
*
* @return array
*/
- function _individualCustomCSVData($customGroupTitle, $firstName1, $firstName2, $id1, $id2) {
+ public function _individualCustomCSVData($customGroupTitle, $firstName1, $firstName2, $id1, $id2) {
list($customDataParams, $customDataVerify) = $this->_addCustomData($customGroupTitle, $id1, $id2);
$headers = array(
*
* @return array
*/
- function _addCustomData($customGroupTitle, $id1, $id2) {
+ public function _addCustomData($customGroupTitle, $id1, $id2) {
$this->openCiviPage("admin/custom/group", "reset=1");
$contactReferenceFieldId = $contactReferenceFieldId[1];
$customDataParams = array(
- 'headers' =>
- array(
+ 'headers' => array(
"custom_{$dateFieldId}" => "$dateFieldLabel :: $customGroupTitle",
"custom_{$radioFieldId}" => "$radioFieldLabel :: $customGroupTitle",
"custom_{$multiSelectFieldId}" => "$multiSelectLabel :: $customGroupTitle",
"custom_{$contactReferenceFieldId}" => "$contactReferenceLabel :: $customGroupTitle",
),
- 'rows' =>
- array(0 => array("custom_{$dateFieldId}" => date('Y-m-d'),
+ 'rows' => array(
+ 0 => array(
+ "custom_{$dateFieldId}" => date('Y-m-d'),
"custom_{$radioFieldId}" => '2',
"custom_{$multiSelectFieldId}" => '3',
"custom_{$contactReferenceFieldId}" => $id1,
),
- 1 => array("custom_{$dateFieldId}" => date('Y-m-d', mktime(0, 0, 0, 4, 5, date('Y'))),
+ 1 => array(
+ "custom_{$dateFieldId}" => date('Y-m-d', mktime(0, 0, 0, 4, 5, date('Y'))),
"custom_{$radioFieldId}" => '1',
"custom_{$multiSelectFieldId}" => '2',
"custom_{$contactReferenceFieldId}" => $id2,
return array($customDataParams, $customDataVerify);
}
}
-