| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php';
* @return array
*/
public function _contributionIndividualCSVData() {
- $firstName1 = substr(sha1(rand()), 0, 7);
- $lastName1 = substr(sha1(rand()), 0, 7);
+ $firstName1 = substr(sha1(rand()), 0, 7);
+ $lastName1 = substr(sha1(rand()), 0, 7);
$externalId1 = substr(sha1(rand()), 0, 4);
$this->_addContact($firstName1, $lastName1, $externalId1);
- $firstName2 = substr(sha1(rand()), 0, 7);
- $lastName2 = substr(sha1(rand()), 0, 7);
+ $firstName2 = substr(sha1(rand()), 0, 7);
+ $lastName2 = substr(sha1(rand()), 0, 7);
$externalId2 = substr(sha1(rand()), 0, 4);
$this->_addContact($firstName2, $lastName2, $externalId2);
$headers = array(
'external_identifier' => 'External Identifier',
'fee_amount' => 'Fee Amount',
- 'financial_type' => 'Financial Type',
+ 'financial_type' => 'Financial Type',
'contribution_status_id' => 'Contribution Status',
'total_amount' => 'Total Amount',
);
array(
'external_identifier' => $externalId1,
'fee_amount' => '200',
- 'financial_type' => 'Donation',
+ 'financial_type' => 'Donation',
'contribution_status_id' => 'Completed',
'total_amount' => '200',
),
array(
'external_identifier' => $externalId2,
'fee_amount' => '400',
- 'financial_type' => 'Donation',
+ 'financial_type' => 'Donation',
'contribution_status_id' => 'Completed',
'total_amount' => '400',
),
);
$fieldMapper = array(
'mapper[0][0]' => 'external_identifier',
- 'mapper[2][0]' => 'financial_type',
+ 'mapper[2][0]' => 'financial_type',
'mapper[4][0]' => 'total_amount',
);
return array($headers, $rows, $fieldMapper);
public function _memberIndividualCSVData() {
$memTypeParams = $this->webtestAddMembershipType();
- $firstName1 = substr(sha1(rand()), 0, 7);
- $lastName1 = substr(sha1(rand()), 0, 7);
+ $firstName1 = substr(sha1(rand()), 0, 7);
+ $lastName1 = substr(sha1(rand()), 0, 7);
$externalId1 = substr(sha1(rand()), 0, 4);
$this->_addContact($firstName1, $lastName1, $externalId1);
$startDate1 = date('Y-m-d');
$year = date('Y') - 1;
- $firstName2 = substr(sha1(rand()), 0, 7);
- $lastName2 = substr(sha1(rand()), 0, 7);
+ $firstName2 = substr(sha1(rand()), 0, 7);
+ $lastName2 = substr(sha1(rand()), 0, 7);
$externalId2 = substr(sha1(rand()), 0, 4);
$this->_addContact($firstName2, $lastName2, $externalId2);
public function _participantIndividualCSVData() {
$eventInfo = $this->_addNewEvent();
- $firstName1 = substr(sha1(rand()), 0, 7);
- $lastName1 = substr(sha1(rand()), 0, 7);
+ $firstName1 = substr(sha1(rand()), 0, 7);
+ $lastName1 = substr(sha1(rand()), 0, 7);
$externalId1 = substr(sha1(rand()), 0, 4);
$this->_addContact($firstName1, $lastName1, $externalId1);
- $firstName2 = substr(sha1(rand()), 0, 7);
- $lastName2 = substr(sha1(rand()), 0, 7);
+ $firstName2 = substr(sha1(rand()), 0, 7);
+ $lastName2 = substr(sha1(rand()), 0, 7);
$externalId2 = substr(sha1(rand()), 0, 4);
$this->_addContact($firstName2, $lastName2, $externalId2);
* @param string $lastName
* @param int $externalId
*
- * @return int external id
+ * @return int
+ * external id
*/
public function _addContact($firstName, $lastName, $externalId) {
$this->openCiviPage('contact/add', 'reset=1&ct=Individual');
*
* @param array $params
*
- * @return array event details of newly created event
+ * @return array
+ * event details of newly created event
*/
public function _addNewEvent($params = array()) {
if (empty($params)) {
$this->waitForElementPresent("_qf_Fee_upload-bottom");
$this->click("CIVICRM_QFID_1_is_monetary");
$this->click("xpath=//tr[@class='crm-event-manage-fee-form-block-payment_processor']/td[2]/label[text()='$processorName']");
- $this->select( "financial_type_id", "value=4" );
+ $this->select("financial_type_id", "value=4");
$counter = 1;
foreach ($params['fee_level'] as $label => $amount) {
// verify event input on info page
// start at Manage Events listing
$this->openCiviPage('event/manage', 'reset=1');
- $this->type("xpath=//div[@class='crm-block crm-form-block crm-event-searchevent-form-block']/table/tbody/tr/td/input",$params['title']);
+ $this->type("xpath=//div[@class='crm-block crm-form-block crm-event-searchevent-form-block']/table/tbody/tr/td/input", $params['title']);
$this->click("_qf_SearchEvent_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->clickLink("link=" . $params['title'], NULL);
return $params;
}
+
}