$params = array_merge($defaults, $params);
- //have a crack @ deleting it first in the hope this will prevent derailing our tests
- $this->callAPISuccess('custom_group', 'get', array(
- 'title' => $params['title'],
- array('api.custom_group.delete' => 1),
- ));
-
return $this->callAPISuccess('custom_group', 'create', $params);
}
* @return void
*/
public function setMockSettingsMetaData($extras) {
- Civi::service('settings_manager')->flush();
-
CRM_Utils_Hook::singleton()
->setHook('civicrm_alterSettingsMetaData', function (&$metadata, $domainId, $profile) use ($extras) {
$metadata = array_merge($metadata, $extras);
});
+ Civi::service('settings_manager')->flush();
+
$fields = $this->callAPISuccess('setting', 'getfields', array());
foreach ($extras as $key => $spec) {
$this->assertNotEmpty($spec['title']);