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();`).
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']);