Merge pull request #9187 from sqweets/ExportHeadersRelationships
[civicrm-core.git] / tests / phpunit / WebTest / Contribute / AddBatchesTest.php
index 82bdc1902591bc0af29696be55a5d15d5c9fc38a..95f126ac9ded6c371bab688d2efd6eb39dc9b13b 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -280,11 +280,11 @@ class WebTest_Contribute_AddBatchesTest extends CiviSeleniumTestCase {
       $this->webtestVerifyTabularData($expected);
       $expectedSoft = array(
         'Soft Credit To' => "{$data['soft_credit_first_name']} {$data['soft_credit_last_name']}",
-        'Amount (Soft Credit Type)' => $data['soft_credit_amount'],
+        'Amount (Soft Credit Type)' => "{$data['soft_credit_amount']}",
         'Soft Credit Type' => $data['soft_credit_type'],
       );
       foreach ($expectedSoft as $value) {
-        $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+        $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
       }
     }
     elseif ($type == "Membership") {
@@ -300,7 +300,7 @@ class WebTest_Contribute_AddBatchesTest extends CiviSeleniumTestCase {
         4 => 'New',
       );
       foreach ($expected as $label => $value) {
-        $this->verifyText("xpath=id('MembershipView')/div[2]/div/table[1]/tbody/tr[$label]/td[2]", preg_quote($value));
+        $this->assertElementContainsText("xpath=id('MembershipView')/div[2]/div/table[1]/tbody/tr[$label]/td[2]", $value);
       }
       //View Contribution
       $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
@@ -316,11 +316,11 @@ class WebTest_Contribute_AddBatchesTest extends CiviSeleniumTestCase {
       $this->webtestVerifyTabularData($expected);
       $expectedSoft = array(
         'Soft Credit To' => "{$data['soft_credit_first_name']} {$data['soft_credit_last_name']}",
-        'Amount (Soft Credit Type)' => $data['soft_credit_amount'],
+        'Amount (Soft Credit Type)' => "{$data['soft_credit_amount']}",
         'Soft Credit Type' => $data['soft_credit_type'],
       );
       foreach ($expectedSoft as $value) {
-        $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+        $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
       }
     }
   }