From e95bf510c46c3a428b3289541774190e4cb5a318 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 15 Jun 2018 14:48:57 -0700 Subject: [PATCH] (dev/core#174) api_v3_SettingTest - Remove unused cache reference This unit is clearing out a non-existent cache item. To see that it is non-existent, I grepped (case-insensitive) for the expressions: * `CiviCRM setting Spec` * `CiviCRM setting ` * `setting spec` This feels like left-overs from 4.6. In 4.7, the setting cache was reworked. Note that `SettingTest` does clear newer cache (`Civi::cache('settings')->flush();`). --- tests/phpunit/api/v3/SettingTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/phpunit/api/v3/SettingTest.php b/tests/phpunit/api/v3/SettingTest.php index a6b2a817a5..1c41fd9565 100644 --- a/tests/phpunit/api/v3/SettingTest.php +++ b/tests/phpunit/api/v3/SettingTest.php @@ -351,9 +351,6 @@ class api_v3_SettingTest extends CiviUnitTestCase { public function testGetExtensionSetting() { $this->hookClass->setHook('civicrm_alterSettingsFolders', array($this, 'setExtensionMetadata')); $data = NULL; - // the caching of data to all duplicates the caching of data to the empty string - CRM_Core_BAO_Cache::setItem($data, 'CiviCRM setting Spec', 'All'); - CRM_Core_BAO_Cache::setItem($data, 'CiviCRM setting Specs', 'settingsMetadata__'); Civi::cache('settings')->flush(); $fields = $this->callAPISuccess('setting', 'getfields', array('filters' => array('group_name' => 'Test Settings'))); $this->assertArrayHasKey('test_key', $fields['values']); -- 2.25.1