diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-22 15:18:56 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-22 15:18:56 +0000 |
commit | 748d7ea037ca1857977c825cbee25b61ff0c5ea7 (patch) | |
tree | fc653a9f8aef695345e870b463f3c07036b95ac8 /modules/simpletest | |
parent | 4acbcf6d8fc2b24e2c31a573913aa69283efb6bd (diff) | |
download | brdo-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/simpletest')
-rw-r--r-- | modules/simpletest/tests/schema.test | 19 |
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') { |