summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/schema.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/simpletest/tests/schema.test b/modules/simpletest/tests/schema.test
index 8c6fa7f46..7570ab9d8 100644
--- a/modules/simpletest/tests/schema.test
+++ b/modules/simpletest/tests/schema.test
@@ -112,6 +112,25 @@ class SchemaTestCase extends DrupalWebTestCase {
$count = db_query('SELECT COUNT(*) FROM {test_table}')->fetchField();
$this->assertEqual($count, 2, t('There were two rows.'));
+
+ // Use database specific data type and ensure that table is created.
+ $table_specification = array(
+ 'description' => 'Schema table description.',
+ 'fields' => array(
+ 'timestamp' => array(
+ 'mysql_type' => 'timestamp',
+ 'pgsql_type' => 'timestamp',
+ 'sqlite_type' => 'datetime',
+ 'not null' => FALSE,
+ 'default' => NULL,
+ ),
+ ),
+ );
+ try {
+ db_create_table('test_timestamp', $table_specification);
+ }
+ catch (Exception $e) {}
+ $this->assertTrue(db_table_exists('test_timestamp'), t('Table with database specific datatype was created.'));
}
function tryInsert($table = 'test_table') {