From e1fd0c31bb837328e93383d7eb1aa68ac0e589d4 Mon Sep 17 00:00:00 2001 From: Jon goldberg Date: Thu, 1 Jun 2017 05:46:58 -0400 Subject: [PATCH] Test for CRM-19610 --- tests/phpunit/Civi/Core/SettingsBagTest.php | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/phpunit/Civi/Core/SettingsBagTest.php diff --git a/tests/phpunit/Civi/Core/SettingsBagTest.php b/tests/phpunit/Civi/Core/SettingsBagTest.php new file mode 100644 index 0000000000..3e2e6811ea --- /dev/null +++ b/tests/phpunit/Civi/Core/SettingsBagTest.php @@ -0,0 +1,33 @@ +origSetting = $GLOBALS['civicrm_setting']; + + parent::setUp(); + $this->useTransaction(TRUE); + + $this->mandates = array(); + } + + public function tearDown() { + $GLOBALS['civicrm_setting'] = $this->origSetting; + parent::tearDown(); + } + + /** + * CRM-19610 - Ensure InnoDb FTS doesn't break search preferenes when disabled. + */ + public function testInnoDbFTS() { + + $settingsBag = \Civi::settings(); + + $settingsBag->set("enable_innodb_fts", "0"); + $this->assertEquals(0, $settingsBag->get('enable_innodb_fts')); + } + +} -- 2.25.1