summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/simpletest/tests/schema.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/simpletest/tests/schema.test b/modules/simpletest/tests/schema.test
index da48b9395..637bc0b6f 100644
--- a/modules/simpletest/tests/schema.test
+++ b/modules/simpletest/tests/schema.test
@@ -128,4 +128,15 @@ class SchemaTestCase extends DrupalWebTestCase {
$this->assertEqual($comment, $description, t('The comment matches the schema description.'));
}
}
+
+ /**
+ * Test index status.
+ */
+ function testCheckIndex() {
+ $node_changed_index = Database::getConnection()->schema()->indexExists('node', 'node_changed');
+ $this->assertTrue($node_changed_index, t('Node index exists'));
+
+ $node_fake_index = Database::getConnection()->schema()->indexExists('node', 'node_not_exists');
+ $this->assertFalse($node_fake_index, t('Fake index does not exists'));
+ }
}