X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FCiviTest%2FCiviUnitTestCase.php;h=c6c473e4303a3521c2278b2f327069e76860001a;hb=9fd87c273d7e3242875b21db87f60bdd3db4d255;hp=db21ca346ab6b09bfc55b17585f23ba3e64d5861;hpb=eba394d9a3f8e30ab7ddab07a1410b5b8f621a1b;p=civicrm-core.git diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index db21ca346a..c6c473e430 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1357,12 +1357,6 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { $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); } @@ -1948,13 +1942,13 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) * @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']);