Skip to content

Commit

Permalink
dev/core#1425 Replace deprecated settings fns in test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Nov 28, 2019
1 parent 8e6b725 commit a11ce20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/phpunit/CRM/Core/BAO/SettingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ public static function _testOnChange_onChangeExample($oldValue, $newValue, $meta
*
*/
public function testSetCivicrmEnvironment() {
CRM_Core_BAO_Setting::setItem('Staging', CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME, 'environment');
$values = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME, 'environment');
Civi::settings()->set('environment', 'Staging');
$values = Civi::settings()->get('environment');
$this->assertEquals('Staging', $values);
global $civicrm_setting;
$civicrm_setting[CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME]['environment'] = 'Development';
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Financial/BAO/FinancialTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function testDel() {
* Set ACLs for Financial Types()
*/
public function setACL() {
CRM_Core_BAO_Setting::setItem(['acl_financial_type' => 1], NULL, 'contribution_invoice_settings');
Civi::settings()->set('acl_financial_type', 1);
}

/**
Expand Down

0 comments on commit a11ce20

Please sign in to comment.