CRM_Case_PseudoConstantTest - Fix
authorTim Otten <totten@civicrm.org>
Thu, 28 Aug 2014 04:04:50 +0000 (21:04 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 28 Aug 2014 04:04:50 +0000 (21:04 -0700)
The old assertion was dependending on the previous test (e.g. the
list of case-types added/removed). By changing the base class
to CiviCaseTestCase, we get a more consistent (but different)
starting point.

tests/phpunit/CRM/Case/PseudoConstantTest.php

index 9e6394b01a0f0a82987821af8729dd9eeefd5b95..5df9ace7a81613bbc4e408a00d6a650ca39e5f52 100644 (file)
@@ -1,10 +1,10 @@
 <?php
-require_once 'CiviTest/CiviUnitTestCase.php';
+require_once 'CiviTest/CiviCaseTestCase.php';
 
 /**
  * Class CRM_Case_PseudoConstantTest
  */
-class CRM_Case_PseudoConstantTest extends CiviUnitTestCase {
+class CRM_Case_PseudoConstantTest extends CiviCaseTestCase {
   /**
    * @return array
    */
@@ -16,19 +16,12 @@ class CRM_Case_PseudoConstantTest extends CiviUnitTestCase {
     );
   }
 
-  function setUp() {
-    parent::setUp();
-
-    $this->loadAllFixtures();
-
-    CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase');
-  }
-
   function testCaseType() {
     CRM_Core_PseudoConstant::flush();
     $caseTypes = CRM_Case_PseudoConstant::caseType();
     $expectedTypes = array(
-        1 => 'Housing Support',
+      1 => 'Housing Support',
+      2 => 'Adult Day Care Referral',
     );
     $this->assertEquals($expectedTypes, $caseTypes);
   }