diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-11-07 22:45:43 -0800 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-11-07 22:45:43 -0800 |
commit | bed5980643b6703e722a28815ebf29d4348b60cc (patch) | |
tree | 0c3c6f652403d878001629847864e3274e3d85c0 | |
parent | 56467535980b9b01559b2ea6f087c7d4c5b3615f (diff) | |
download | brdo-bed5980643b6703e722a28815ebf29d4348b60cc.tar.gz brdo-bed5980643b6703e722a28815ebf29d4348b60cc.tar.bz2 |
Missing files.
-rw-r--r-- | modules/simpletest/tests/update_script_test.info | 6 | ||||
-rw-r--r-- | modules/simpletest/tests/update_script_test.install | 45 | ||||
-rw-r--r-- | modules/simpletest/tests/update_script_test.module | 1 |
3 files changed, 52 insertions, 0 deletions
diff --git a/modules/simpletest/tests/update_script_test.info b/modules/simpletest/tests/update_script_test.info new file mode 100644 index 000000000..be1e3d849 --- /dev/null +++ b/modules/simpletest/tests/update_script_test.info @@ -0,0 +1,6 @@ +name = "Update script test" +description = "Support module for update script testing." +package = Testing +version = VERSION +core = 7.x +hidden = TRUE diff --git a/modules/simpletest/tests/update_script_test.install b/modules/simpletest/tests/update_script_test.install new file mode 100644 index 000000000..6955ef11d --- /dev/null +++ b/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.'); +} diff --git a/modules/simpletest/tests/update_script_test.module b/modules/simpletest/tests/update_script_test.module new file mode 100644 index 000000000..b3d9bbc7f --- /dev/null +++ b/modules/simpletest/tests/update_script_test.module @@ -0,0 +1 @@ +<?php |