CRM-15855 - Allow mailings to be saved (but not sent) without name+subject.
[civicrm-core.git] / tests / phpunit / CiviTest / CiviCaseTestCase.php
index eb28b6efc1b68e9bc6093aa9f101d8addfc6ddc0..ce6f032591b16e7cddb8a8264265d8f719594769 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 require_once 'CiviTest/CiviUnitTestCase.php';
 
@@ -52,6 +52,7 @@ class CiviCaseTestCase extends CiviUnitTestCase {
     $hooks = \CRM_Utils_Hook::singleton();
     $hooks->setHook('civicrm_caseTypes', array($this, 'hook_caseTypes'));
     \CRM_Case_XMLRepository::singleton(TRUE);
+    \CRM_Case_XMLProcessor::flushStaticCaches();
 
     // CRM-9404 - set-up is a bit cumbersome but had to put something in place to set up activity types & case types
     //. Using XML was causing breakage as id numbers were changing over time
@@ -59,7 +60,7 @@ class CiviCaseTestCase extends CiviUnitTestCase {
     // state where tests could run afterwards without re-loading.
     $this->caseStatusGroup = $this->callAPISuccess('option_group', 'get', array(
         'name' => 'case_status',
-        'format.only_id' => 1
+        'format.only_id' => 1,
       )
     );
     $optionValues = array(
@@ -95,6 +96,7 @@ class CiviCaseTestCase extends CiviUnitTestCase {
       'civicrm_case_activity',
       'civicrm_case_type',
       'civicrm_activity_contact',
+      'civicrm_managed',
       'civicrm_relationship',
       'civicrm_relationship_type',
     );
@@ -123,10 +125,8 @@ class CiviCaseTestCase extends CiviUnitTestCase {
   /**
    * Tears down the fixture, for example, closes a network connection.
    * This method is called after a test is executed.
-   *
-   * @access protected
    */
-  function tearDown() {
+  public function tearDown() {
     $this->quickCleanup($this->tablesToTruncate, TRUE);
     $this->customDirectories(array('template_path' => FALSE));
     CRM_Case_XMLRepository::singleton(TRUE);
@@ -138,6 +138,7 @@ class CiviCaseTestCase extends CiviUnitTestCase {
    * @param $caseTypes
    * @see CRM_Utils_Hook::caseTypes
    */
-  function hook_caseTypes(&$caseTypes) {
+  public function hook_caseTypes(&$caseTypes) {
   }
-}
\ No newline at end of file
+
+}