From: Tim Otten Date: Sat, 12 Sep 2015 20:58:37 +0000 (-0700) Subject: config->countryLimit - Don't directly modify array X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eefea86b661e5b44a337a9762ba88c74a1c998d7;p=civicrm-core.git config->countryLimit - Don't directly modify array When using magic method for countryLimit, it's difficult to directly modify the array. It's easier to replace the array as a whole. --- diff --git a/tests/phpunit/api/v3/ProfileTest.php b/tests/phpunit/api/v3/ProfileTest.php index 75542efb4d..4c6e2913e6 100644 --- a/tests/phpunit/api/v3/ProfileTest.php +++ b/tests/phpunit/api/v3/ProfileTest.php @@ -45,8 +45,10 @@ class api_v3_ProfileTest extends CiviUnitTestCase { $this->_apiversion = 3; parent::setUp(); $config = CRM_Core_Config::singleton(); - $config->countryLimit[1] = 1013; - $config->stateLimit[1] = 1013; + $countryLimit = $config->countryLimit; + $countryLimit[1] = 1013; + $config->countryLimit = $countryLimit; + $this->createLoggedInUser(); $this->_membershipTypeID = $this->membershipTypeCreate(); }