function DatabaseRegressionTestCase::testDBIndexExists

Test the db_index_exists() function.

File

modules/simpletest/tests/database_test.test, line 3126

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.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.