From 8b0fc579113af6be4357f881b2d12cd885af3d46 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 15 Dec 2009 08:30:53 +0000 Subject: - Patch #360854 by sammys, Crell: added missing db_index_exists(), required to provide proper upgrade path from Drupal 6 to Drupal 7. --- modules/simpletest/tests/schema.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules') 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')); + } } -- cgit v1.2.3