X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FJSON.php;h=5f3bcabd85a2e3c275ca917e77d5f413a67d3d73;hb=6e902643f72c1e215dbdd04e15e99148c2f9706e;hp=144c66900220bf3183ac3a7da64bc8c95da98cd3;hpb=eda4c5942ca6c0f3f394957acac921b9d3d9854e;p=civicrm-core.git diff --git a/CRM/Utils/JSON.php b/CRM/Utils/JSON.php index 144c669002..5f3bcabd85 100644 --- a/CRM/Utils/JSON.php +++ b/CRM/Utils/JSON.php @@ -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();