Merge pull request #14254 from yashodha/add_dev_tab
[civicrm-core.git] / tests / phpunit / CiviTest / CiviUnitTestCase.php
index db21ca346ab6b09bfc55b17585f23ba3e64d5861..c6c473e4303a3521c2278b2f327069e76860001a 100644 (file)
@@ -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']);