3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * Class CiviReportTestCase
16 class CRM_Core_BAO_ConfigSettingTest
extends CiviUnitTestCase
{
18 public function testToggleComponent() {
20 foreach (CRM_Core_Component
::getEnabledComponents() as $c) {
21 $origNames[] = $c->name
;
23 $this->assertTrue(!in_array('CiviCase', $origNames));
25 $enableResult = CRM_Core_BAO_ConfigSetting
::enableComponent('CiviCase');
26 $this->assertTrue($enableResult, 'Cannot enable CiviCase in line ' . __LINE__
);
29 foreach (CRM_Core_Component
::getEnabledComponents() as $c) {
30 $newNames[] = $c->name
;
33 $this->assertTrue(in_array('CiviCase', $newNames));
34 $this->assertEquals(count($newNames), count($origNames) +
1);