Merge pull request #4865 from eileenmcnaughton/my-first-factory
[civicrm-core.git] / tests / phpunit / WebTest / Contribute / OnlineContributionTest.php
index 65269fff48cc94652a95015a6a7f20992c309e23..4f0eb82276712bf722234de05f07c05eacac6a9f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -35,7 +35,7 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
     parent::setUp();
   }
 
-  function testOnlineContributionAdd() {
+  public function testOnlineContributionAdd() {
     $this->webtestLogin();
 
     // Use default payment processor
@@ -146,7 +146,7 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
 
     $this->type("sort_name", "$lastName $firstName");
     $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",FALSE);
+    $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
 
     //View Contribution Record and verify data
     $expected = array(
@@ -176,9 +176,9 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
     // Is contact present?
     $this->assertTrue($this->isTextPresent("$honorDisplayName"), "Honoree contact not found.");
 
-    }
+  }
 
-  function testOnlineContributionWithZeroAmount () {
+  public function testOnlineContributionWithZeroAmount () {
     $this->webtestLogin();
 
     // Use default payment processor
@@ -255,7 +255,7 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
    * @param int $pageId
    * @param bool $priceSet
    */
-  function _doContributionAndVerifyData($pageId, $priceSet = FALSE) {
+  public function _doContributionAndVerifyData($pageId, $priceSet = FALSE) {
     //logout
     $this->webtestLogout();
     $amountLabel = 'Total Amount';
@@ -293,13 +293,12 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
 
     $this->clickLink("_qf_Confirm_next-bottom", NULL);
 
-
     //login to check contribution
 
     // Log in using webtestLogin() method
     $this->webtestLogin();
 
-      //Find Contribution
+    //Find Contribution
     $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
 
     $this->type("sort_name", "$lastName $firstName");
@@ -311,9 +310,8 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase {
       'From' => "{$firstName} {$lastName}",
       'Financial Type' => 'Donation',
       $amountLabel => $amountValue,
-      'Contribution Status' => 'Completed'
+      'Contribution Status' => 'Completed',
     );
     $this->webtestVerifyTabularData($expected);
   }
 }
-