1 database_test.test DatabaseRegressionTestCase::testDBIndexExists()

Test the db_index_exists() function.

File

core/modules/simpletest/tests/database_test.test, line 2792
Database tests.

Class

DatabaseRegressionTestCase
Regression tests.

Code

function testDBIndexExists() {
  $this->assertIdentical(TRUE, db_index_exists('node', 'node_created'), 'Returns true for existent index.');
  $this->assertIdentical(FALSE, db_index_exists('node', 'nosuchindex'), 'Returns false for nonexistent index.');
}