CRM-17860 - CiviTest bootstrap - Move test define()s from `cv` to `civicrm.settings...
authorTim Otten <totten@civicrm.org>
Fri, 22 Jan 2016 20:29:59 +0000 (12:29 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 2 Feb 2016 04:56:23 +0000 (21:56 -0700)
templates/CRM/common/civicrm.settings.php.template
tests/phpunit/CiviTest/bootstrap.php

index 33b8c5d26c45ad6a3f5664a89bb93da76b323258..3da5559f4d0eed714b3c5db0ba2bf666a4a95cb2 100644 (file)
@@ -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
index 955ce7ef1fe5b249a8eee963e75f55678e749322..7bf987755161d36a47a639ad2636077f8b0b517c 100644 (file)
@@ -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";