CRM-18454: webtest fixes
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 27 Apr 2016 13:17:39 +0000 (18:47 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 27 Apr 2016 13:21:14 +0000 (18:51 +0530)
CRM-18454: webtest fixes

tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/WebTest/Contribute/AddBatchesTest.php

index e2da3a3c16bf7389954eb6c064321f7d3933fd41..c3ed08a975d9d64663b3d6123888896b86df5c20 100644 (file)
@@ -368,7 +368,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
   public function webtestGetValidCountryID() {
     static $_country_id;
     if (is_null($_country_id)) {
-      $_country_id = $this->webtestGetSetting('defaultContactCountry');
+      $_country_id = Civi::settings()->get('defaultContactCountry');
     }
     return $_country_id;
   }
index 8a471ecbd4c53ee4d71f3aa7e6d5b0f32020a386..95f126ac9ded6c371bab688d2efd6eb39dc9b13b 100644 (file)
@@ -280,7 +280,7 @@ 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) {
@@ -316,7 +316,7 @@ 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) {