* Class CRM_Core_InnoDBIndexerTest
*/
class CRM_Core_InnoDBIndexerTest extends CiviUnitTestCase {
- function tearDown() {
+ public function tearDown() {
// May or may not cleanup well if there's a bug in the indexer.
// This is better than nothing -- and better than duplicating the
// cleanup logic.
parent::tearDown();
}
- function testHasDeclaredIndex() {
+ public function testHasDeclaredIndex() {
$idx = new CRM_Core_InnoDBIndexer(TRUE, array(
'civicrm_contact' => array(
array('first_name', 'last_name'),
- array('foo')
+ array('foo'),
),
'civicrm_email' => array(
array('whiz'),
/**
* When disabled, there is no FTS index, so queries that rely on FTS index fail.
*/
- function testDisabled() {
+ public function testDisabled() {
$idx = new CRM_Core_InnoDBIndexer(FALSE, array(
'civicrm_contact' => array(
array('first_name', 'last_name'),
try {
CRM_Core_DAO::executeQuery('SELECT id FROM civicrm_contact WHERE MATCH(first_name,last_name) AGAINST ("joe")');
$this->fail("Missed expected exception");
- } catch (Exception $e) {
+ }
+ catch (Exception $e) {
$this->assertTrue(TRUE, 'Received expected exception');
}
}
/**
* When enabled, the FTS index is created, so queries that rely on FTS work.
*/
- function testEnabled() {
+ public function testEnabled() {
if (!$this->supportsFts()) {
$this->markTestSkipped("Local installation of InnoDB does not support FTS.");
return;
CRM_Core_DAO::executeQuery('SELECT id FROM civicrm_contact WHERE MATCH(first_name,last_name) AGAINST ("joe")');
}
- function supportsFts() {
+ /**
+ * @return mixed
+ */
+ public function supportsFts() {
return version_compare(CRM_Core_DAO::singleValueQuery('SELECT VERSION()'), '5.6.0', '>=');
}
+
}