comparison modules/simpletest/tests/update_test_1.install @ 0:ff03f76ab3fe

initial version
author danieleb <danielebarchiesi@me.com>
date Wed, 21 Aug 2013 18:51:11 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ff03f76ab3fe
1 <?php
2
3 /**
4 * @file
5 * Install, update and uninstall functions for the update_test_1 module.
6 */
7
8 /**
9 * Implements hook_update_dependencies().
10 *
11 * @see update_test_2_update_dependencies()
12 */
13 function update_test_1_update_dependencies() {
14 // These dependencies are used in combination with those declared in
15 // update_test_2_update_dependencies() for the sole purpose of testing that
16 // the results of hook_update_dependencies() are collected correctly and have
17 // the correct array structure. Therefore, we use updates from System module
18 // (which have already run), so that they will not get in the way of other
19 // tests.
20 $dependencies['system'][7000] = array(
21 // Compare to update_test_2_update_dependencies(), where the same System
22 // module update function is forced to depend on an update function from a
23 // different module. This allows us to test that both dependencies are
24 // correctly recorded.
25 'update_test_1' => 7000,
26 );
27 $dependencies['system'][7001] = array(
28 // Compare to update_test_2_update_dependencies(), where the same System
29 // module update function is forced to depend on a different update
30 // function within the same module. This allows us to test that only the
31 // dependency on the higher-numbered update function is recorded.
32 'update_test_1' => 7002,
33 );
34 return $dependencies;
35 }
36
37 /**
38 * Dummy update_test_1 update 7000.
39 */
40 function update_test_1_update_7000() {
41 }
42
43 /**
44 * Dummy update_test_1 update 7001.
45 */
46 function update_test_1_update_7001() {
47 }
48
49 /**
50 * Dummy update_test_1 update 7002.
51 */
52 function update_test_1_update_7002() {
53 }