dev/core#3160 fix inability to import 'just contactid' and add to group
[civicrm-core.git] / CRM / Utils / JSON.php
index 144c66900220bf3183ac3a7da64bc8c95da98cd3..5f3bcabd85a2e3c275ca917e77d5f413a67d3d73 100644 (file)
@@ -25,6 +25,9 @@ class CRM_Utils_JSON {
    * @param mixed $input
    */
   public static function output($input) {
+    if (CIVICRM_UF === 'UnitTests') {
+      throw new CRM_Core_Exception_PrematureExitException('civiExit called', $input);
+    }
     CRM_Utils_System::setHttpHeader('Content-Type', 'application/json');
     echo json_encode($input);
     CRM_Utils_System::civiExit();