function DatabaseRegressionTestCase::testDBIndexExists in Drupal 7
Test the db_index_exists() function.
File
- modules/
simpletest/ tests/ database_test.test, line 2956
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.');
}