1.20.x database_test.test DatabaseRegressionTestCase::testDBIndexExists()

Test the db_index_exists() function.

File

modules/simpletest/tests/database_test.test, line 2818
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.');
}