function RegressionTest::testDBIndexExists

Tests the db_index_exists() function.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Database/RegressionTest.php, line 66
Definition of Drupal\system\Tests\Database\RegressionTest.

Class

RegressionTest
Tests for database regressions.

Namespace

Drupal\system\Tests\Database

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