From: eileen Date: Wed, 18 Apr 2018 14:28:39 +0000 (+1200) Subject: Fix intermittant test bug X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=767195800272a338dbd1aa74303690c24cd5bc2f;p=civicrm-core.git Fix intermittant test bug --- diff --git a/tests/phpunit/CRM/Contact/BAO/ContactTest.php b/tests/phpunit/CRM/Contact/BAO/ContactTest.php index 2d13628a97..81998d865d 100644 --- a/tests/phpunit/CRM/Contact/BAO/ContactTest.php +++ b/tests/phpunit/CRM/Contact/BAO/ContactTest.php @@ -1595,10 +1595,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase { //create the contact using create profile contact. $fields = CRM_Contact_BAO_Contact::exportableFields('Individual'); - // for this test, we need to make CiviCRM think we are logged in - // so that updateBlankLocInfo is set to 1 (erase blank value from the database) - CRM_Core_Session::singleton()->set('authSrc', CRM_Core_Permission::AUTH_SRC_LOGIN); - + $this->createLoggedInUser(); // now, emulate the contact update using a profile $contactID = CRM_Contact_BAO_Contact::createProfileContact($updatePfParams, $fields, $contactId, NULL, NULL, NULL, TRUE