jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/359233 )

Change subject: Remove unnecessary trigger refresh
......................................................................


Remove unnecessary trigger refresh

Fewer db privs needed during test.

Change-Id: I4896c8460c8cb76f362066a10ca717c154af5ef7
---
M sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php
1 file changed, 1 insertion(+), 12 deletions(-)

Approvals:
  jenkins-bot: Verified
  Eileen: Looks good to me, approved



diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php
index 6753876..76b97dc 100644
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php
+++ b/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php
@@ -7,7 +7,7 @@
 class PhoneImportTest extends BaseWmfDrupalPhpUnitTestCase {
 
     public function testPhoneImport() {
-      $this->refreshStripFunction();
+        civicrm_initialize();
 
         $phoneNumber = '555-555-5555';
 
@@ -32,16 +32,5 @@
         $this->assertEquals(wmf_civicrm_get_default_location_type_id(), 
$phone['location_type_id']);
         
$this->assertEquals(CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_Phone', 
'phone_type_id', 'Phone'), $phone['phone_type_id']);
     }
-
-  /**
-   * This SQL function is not created during the test at the right time & it 
seems the triggers ARE
-   * created despite it not being present. This is not an issue on live (where 
the function seems to already exist).
-   */
-  public function refreshStripFunction() {
-    civicrm_initialize();
-    
CRM_Core_DAO::executeQuery(CRM_Contact_BAO_Contact::DROP_STRIP_FUNCTION_43);
-    
CRM_Core_DAO::executeQuery(CRM_Contact_BAO_Contact::CREATE_STRIP_FUNCTION_43);
-    CRM_Core_DAO::executeQuery("UPDATE civicrm_phone SET phone_numeric = 
civicrm_strip_non_numeric(phone)");
-  }
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/359233
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4896c8460c8cb76f362066a10ca717c154af5ef7
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <ej...@ejegg.com>
Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com>
Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Eileen <emcnaugh...@wikimedia.org>
Gerrit-Reviewer: Ejegg <ej...@ejegg.com>
Gerrit-Reviewer: Katie Horn <kh...@wikimedia.org>
Gerrit-Reviewer: Mepps <me...@wikimedia.org>
Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to