update_test_1.install 1.6 KB

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