summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.26/modules/simpletest/tests/update_script_test.install
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.26/modules/simpletest/tests/update_script_test.install')
-rw-r--r--kolab.org/www/drupal-7.26/modules/simpletest/tests/update_script_test.install45
1 files changed, 45 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.26/modules/simpletest/tests/update_script_test.install b/kolab.org/www/drupal-7.26/modules/simpletest/tests/update_script_test.install
new file mode 100644
index 0000000..6955ef1
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/modules/simpletest/tests/update_script_test.install
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * @file
+ * Install, update and uninstall functions for the update_script_test module.
+ */
+
+/**
+ * Implements hook_requirements().
+ */
+function update_script_test_requirements($phase) {
+ $requirements = array();
+
+ if ($phase == 'update') {
+ // Set a requirements warning or error when the test requests it.
+ $requirement_type = variable_get('update_script_test_requirement_type');
+ switch ($requirement_type) {
+ case REQUIREMENT_WARNING:
+ $requirements['update_script_test'] = array(
+ 'title' => 'Update script test',
+ 'value' => 'Warning',
+ 'description' => 'This is a requirements warning provided by the update_script_test module.',
+ 'severity' => REQUIREMENT_WARNING,
+ );
+ break;
+ case REQUIREMENT_ERROR:
+ $requirements['update_script_test'] = array(
+ 'title' => 'Update script test',
+ 'value' => 'Error',
+ 'description' => 'This is a requirements error provided by the update_script_test module.',
+ 'severity' => REQUIREMENT_ERROR,
+ );
+ break;
+ }
+ }
+
+ return $requirements;
+}
+
+/**
+ * Dummy update function to run during the tests.
+ */
+function update_script_test_update_7000() {
+ return t('The update_script_test_update_7000() update was executed successfully.');
+}