$this->waitForPageToLoad($this->getTimeoutMsec());
// Add Contact Details
$data = array();
- for ($i=1; $i<=$itemCount; $i++ ) {
+ for ($i = 1; $i <= $itemCount; $i++) {
$data[$i] = array(
- 'first_name' => 'Ma'.substr(sha1(rand()), 0, 7),
- 'last_name' => 'An'.substr(sha1(rand()), 0, 7),
+ 'first_name' => 'Ma' . substr(sha1(rand()), 0, 7),
+ 'last_name' => 'An' . substr(sha1(rand()), 0, 7),
'financial_type' => 'Donation',
'amount' => 100,
$itemCount = 5;
// create contact
$contact = array();
- $batchTitle = 'Batch-'.substr(sha1(rand()), 0, 7);
+ $batchTitle = 'Batch-' . substr(sha1(rand()), 0, 7);
//Open Live Contribution Page
$this->openCiviPage("batch", "reset=1");
// Add Contact Details
$data = array();
- for ($i=1; $i<=$itemCount; $i++ ) {
+ for ($i = 1; $i <= $itemCount; $i++) {
$data[$i] = array(
- 'first_name' => 'Ma'.substr(sha1(rand()), 0, 7),
- 'last_name' => 'An'.substr(sha1(rand()), 0, 7),
+ 'first_name' => 'Ma' . substr(sha1(rand()), 0, 7),
+ 'last_name' => 'An' . substr(sha1(rand()), 0, 7),
'membership_type' => 'Default Organization',
'amount' => 100,
'financial_type' => 'Member Dues',
$this->click("field_{$row}_invoice_id");
$this->type("field_{$row}_invoice_id", substr(sha1(rand()), 0, 10));
- } elseif ($type == "Membership") {
+ }
+ elseif ($type == "Membership") {
$this->select("field[{$row}][membership_type][0]", $data['membership_type']);
$this->webtestFillDate("field_{$row}_join_date", "now");
$this->webtestFillDate("field_{$row}_membership_start_date", "now");
$this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
$this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom");
$expected = array(
- 'From' => "{$data['first_name']} {$data['last_name']}",
- 'Financial Type' => $data['financial_type'],
- 'Total Amount' => $data['amount'],
+ 'From' => "{$data['first_name']} {$data['last_name']}",
+ 'Financial Type' => $data['financial_type'],
+ 'Total Amount' => $data['amount'],
'Contribution Status' => 'Completed',
);
$this->click("xpath=//div[@class='crm-block crm-content-block crm-membership-view-form-block']/table[2]/tbody/tr[1]/td[8]/span/a[text()='View']");
$this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
$expected = array(
- 'From' => "{$data['first_name']} {$data['last_name']}",
- 'Financial Type' => $data['financial_type'],
- 'Total Amount' => $data['amount'],
+ 'From' => "{$data['first_name']} {$data['last_name']}",
+ 'Financial Type' => $data['financial_type'],
+ 'Total Amount' => $data['amount'],
'Contribution Status' => 'Completed',
);