<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
*/
require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Contribute_OfflineRecurContributionTest
+ */
class WebTest_Contribute_OfflineRecurContributionTest extends CiviSeleniumTestCase {
protected function setUp() {
parent::setUp();
}
- function testOfflineRecurContribution() {
+ public function testOfflineRecurContribution() {
$this->webtestLogin();
// We need a payment processor
$this->webtestAddPaymentProcessor($processorName, 'AuthNet');
// create a new contact for whom recurring contribution is to be created
- $firstName = 'Jane' . substr(sha1(rand()), 0, 7);
+ $firstName = 'Jane' . substr(sha1(rand()), 0, 7);
$middleName = 'Middle';
- $lastName = 'Recuroff_' . substr(sha1(rand()), 0, 7);
+ $lastName = 'Recuroff_' . substr(sha1(rand()), 0, 7);
$this->webtestAddContact($firstName, $lastName, "{$firstName}@example.com");
$contactName = "$firstName $lastName";
$this->waitForElementPresent('payment_processor_id');
$this->select('payment_processor_id', "label={$processorName}");
- $this->click('financial_type_id');
- $this->select('financial_type_id', 'label=Donation');
+ $this->click('financial_type_id');
+ $this->select('financial_type_id', 'label=Donation');
$this->type('total_amount', '10');
// recurring contribution fields
$this->type('installments', '12');
$this->click('is_email_receipt');
- $this->waitForElementPresent('credit_card_type');
+ $this->waitForElementPresent('credit_card_type');
// enter credit card info on form
$this->webtestAddCreditCardDetails();
// View Recurring Contribution Record
$verifyData = array(
'From' => "$contactName",
- 'Financial Type' => 'Donation (test)',
+ 'Financial Type' => 'Donation (test)',
'Total Amount' => 'Installments: 12, Interval: 1 month(s)',
'Contribution Status' => 'Pending : Incomplete Transaction',
'Paid By' => 'Credit Card',
}
}
}
-