From: Tim Otten Date: Fri, 22 Jan 2016 20:29:59 +0000 (-0800) Subject: CRM-17860 - CiviTest bootstrap - Move test define()s from `cv` to `civicrm.settings... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3b2c20b706bed9c88895e2d69cf503a74f0a55cc;p=civicrm-core.git CRM-17860 - CiviTest bootstrap - Move test define()s from `cv` to `civicrm.settings.php` --- diff --git a/templates/CRM/common/civicrm.settings.php.template b/templates/CRM/common/civicrm.settings.php.template index 33b8c5d26c..3da5559f4d 100644 --- a/templates/CRM/common/civicrm.settings.php.template +++ b/templates/CRM/common/civicrm.settings.php.template @@ -394,6 +394,11 @@ if (!defined('CIVICRM_DB_CACHE_PREFIX')) { // define('CIVICRM_MYSQL_STRICT', TRUE ); // } +if (CIVICRM_UF === 'UnitTests') { + if (!defined('CIVICRM_CONTAINER_CACHE')) define('CIVICRM_CONTAINER_CACHE', 'auto'); + if (!defined('CIVICRM_MYSQL_STRICT')) define('CIVICRM_MYSQL_STRICT', true); +} + /** * * Do not change anything below this line. Keep as is diff --git a/tests/phpunit/CiviTest/bootstrap.php b/tests/phpunit/CiviTest/bootstrap.php index 955ce7ef1f..7bf9877551 100644 --- a/tests/phpunit/CiviTest/bootstrap.php +++ b/tests/phpunit/CiviTest/bootstrap.php @@ -15,8 +15,8 @@ if (file_exists('/etc/timezone')) { # Crank up the memory ini_set('memory_limit', '2G'); - -eval(cv('php:boot --test', 1)); +define('CIVICRM_TEST', 1); +eval(cv('php:boot', 1)); // This is exists to support CiviUnitTestCase::populateDB(). That doesn't make it a good idea. require_once "DB.php";