diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-01 11:30:37 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-01 11:30:37 +0000 |
commit | 13704b8f628af43c5bd1c404cb4eb2ef4d550401 (patch) | |
tree | 0108353e4b66e5791fcd9c5c874a4da5a916209a /modules/simpletest/tests/database_test.test | |
parent | 74e94b7e019d29bb58928df0b5b5de8ec3651359 (diff) | |
download | brdo-13704b8f628af43c5bd1c404cb4eb2ef4d550401.tar.gz brdo-13704b8f628af43c5bd1c404cb4eb2ef4d550401.tar.bz2 |
- Patch #722912 by andypost: db_index_exists() must conform schemaAPI indexExists().
Diffstat (limited to 'modules/simpletest/tests/database_test.test')
-rw-r--r-- | modules/simpletest/tests/database_test.test | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test index cf569f7cc..3f3f80008 100644 --- a/modules/simpletest/tests/database_test.test +++ b/modules/simpletest/tests/database_test.test @@ -2391,19 +2391,27 @@ class DatabaseRegressionTestCase extends DatabaseTestCase { } /** + * Test the db_table_exists() function. + */ + function testDBTableExists() { + $this->assertIdentical(TRUE, db_table_exists('node'), t('Returns true for existent table.')); + $this->assertIdentical(FALSE, db_table_exists('nosuchtable'), t('Returns false for nonexistent table.')); + } + + /** * Test the db_column_exists() function. */ function testDBColumnExists() { - $this->assertTrue(db_column_exists('node', 'nid'), t('Returns true for existent column.')); - $this->assertFalse(db_column_exists('node', 'nosuchcolumn'), t('Returns false for nonexistent column.')); + $this->assertIdentical(TRUE, db_column_exists('node', 'nid'), t('Returns true for existent column.')); + $this->assertIdentical(FALSE, db_column_exists('node', 'nosuchcolumn'), t('Returns false for nonexistent column.')); } /** - * Test the db_table_exists() function. + * Test the db_index_exists() function. */ - function testDBTableExists() { - $this->assertTrue(db_table_exists('node'), t('Returns true for existent table.')); - $this->assertFalse(db_table_exists('nosuchtable'), t('Returns false for nonexistent table.')); + function testDBIndexExists() { + $this->assertIdentical(TRUE, db_index_exists('node', 'node_created'), t('Returns true for existent index.')); + $this->assertIdentical(FALSE, db_index_exists('node', 'nosuchindex'), t('Returns false for nonexistent index.')); } } |