INFRA-132 - Move stray comments into docblocks
[civicrm-core.git] / tests / phpunit / WebTest / Contribute / OfflineContributionTest.php
index 68354ecd6ac5fde9c0e1d5193cbdaccd36eec497..3f49498757790b260d19abcfe9a405881fb9085c 100644 (file)
@@ -46,7 +46,7 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
 
     //financial account for check
     $this->openCiviPage("admin/options/payment_instrument", "reset=1");
-    $financialAccount = $this->getText("xpath=//div[@id='payment_instrument']/table/tbody//tr/td[1][text()='Check']/../td[3]");
+    $financialAccount = $this->getText("xpath=//div[@id='payment_instrument']/table/tbody//tr/td[1]/div[text()='Check']/../../td[3]");
 
     // Add new Financial Account
     $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7);
@@ -137,8 +137,6 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
     $this->type("invoice_id", time());
     $this->webtestFillDate('thankyou_date');
 
-
-
     //Premium section
     $this->click("Premium");
     $this->waitForElementPresent("fulfilled_date");
@@ -199,7 +197,7 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
       4 => 'Donation',
       2 => '50.00',
       6 => 'Completed',
-      1 => "{$firstName} {$lastName}"
+      1 => "{$firstName} {$lastName}",
     );
     foreach ($expected as $value => $label) {
       $this->verifyText("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[2]/td[$value]", preg_quote($label));
@@ -310,8 +308,8 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
     $this->_verifyAmounts($checkScenario5);
   }
 
-  //common function for doing offline contribution
   /**
+   * common function for doing offline contribution
    * @param array $params
    * @param string $firstName
    * @param string $lastName
@@ -366,8 +364,8 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("The contribution record has been processed."), "Status message didn't show up after saving!");
   }
 
-  //common function for verifing total_amount, and non_deductible_amount
   /**
+   * common function for verifing total_amount, and non_deductible_amount
    * @param $verifyData
    */
   public function _verifyAmounts($verifyData) {
@@ -382,7 +380,7 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
     $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
 
     foreach ($verifyData as $label => $value) {
-      if ( $label == 'sort_name' ) {
+      if ($label == 'sort_name') {
         continue;
       }
       $this->verifyText("xpath=//form[@id='ContributionView']//table/tbody/tr/td[text()='{$label}']/following-sibling::td",
@@ -397,7 +395,7 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
       "xpath=//form[@id='Basic']/div[3]/div[1]/div[2]/table/tbody/tr[1]/td[11]/span/a[text()='View']");
 
     $this->clickLink("xpath=//form[@id='Basic']/div[3]/div[1]/div[2]/table/tbody/tr[1]/td[11]/span/a[text()='View']",
-    'crm-contact-actions-link', FALSE);
+      'crm-contact-actions-link', FALSE);
   }
 
   public function testOnlineContributionWithZeroAmount() {
@@ -431,7 +429,7 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
       'Financial Type' => 'Donation',
       'Total Amount' => '0.00',
       'Contribution Status' => 'Completed',
-      'Paid By' => 'Credit Card'
+      'Paid By' => 'Credit Card',
     );
     $this->webtestVerifyTabularData($expected);
   }