diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-12-15 08:30:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-12-15 08:30:53 +0000 |
commit | 8b0fc579113af6be4357f881b2d12cd885af3d46 (patch) | |
tree | d71521372e49b1418e17298c24e0ecc599f4a9a4 /modules | |
parent | c3080a04019a7c15ad5bb47634be15aae97240d7 (diff) | |
download | brdo-8b0fc579113af6be4357f881b2d12cd885af3d46.tar.gz brdo-8b0fc579113af6be4357f881b2d12cd885af3d46.tar.bz2 |
- Patch #360854 by sammys, Crell: added missing db_index_exists(), required to provide proper upgrade path from Drupal 6 to Drupal 7.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/tests/schema.test | 11 |
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')); + } } |