summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.26/modules/simpletest/tests/module_test.install
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.26/modules/simpletest/tests/module_test.install')
-rw-r--r--kolab.org/www/drupal-7.26/modules/simpletest/tests/module_test.install42
1 files changed, 42 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.26/modules/simpletest/tests/module_test.install b/kolab.org/www/drupal-7.26/modules/simpletest/tests/module_test.install
new file mode 100644
index 0000000..4cc09df
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/simpletest/tests/module_test.install
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Install, update and uninstall functions for the module_test module.
+ */
+
+/**
+ * Implements hook_schema().
+ */
+function module_test_schema() {
+ $schema['module_test'] = array(
+ 'description' => 'Dummy table to test the behavior of hook_schema() during module installation.',
+ 'fields' => array(
+ 'data' => array(
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => '',
+ 'description' => 'An example data column for the module.',
+ ),
+ ),
+ );
+ return $schema;
+}
+
+/**
+ * Implements hook_install().
+ */
+function module_test_install() {
+ $record = array('data' => 'Data inserted in hook_install()');
+ drupal_write_record('module_test', $record);
+}
+
+/**
+ * Implements hook_enable().
+ */
+function module_test_enable() {
+ $record = array('data' => 'Data inserted in hook_enable()');
+ drupal_write_record('module_test', $record);
+}
+