summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-22 15:18:56 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-22 15:18:56 +0000
commit748d7ea037ca1857977c825cbee25b61ff0c5ea7 (patch)
treefc653a9f8aef695345e870b463f3c07036b95ac8 /modules
parent4acbcf6d8fc2b24e2c31a573913aa69283efb6bd (diff)
downloadbrdo-748d7ea037ca1857977c825cbee25b61ff0c5ea7.tar.gz
brdo-748d7ea037ca1857977c825cbee25b61ff0c5ea7.tar.bz2
#927828 by Damien Tournoud, LaurentAjdnik, boombatower: Fixed contrib can't specify custom schema types. Should fix Date module. Yay.
Diffstat (limited to 'modules')
-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') {