function UpdateDependencyHookInvocationTestCase::testHookUpdateDependencies
Test the structure of the array returned by hook_update_dependencies().
File
-
modules/
simpletest/ tests/ update.test, line 108
Class
- UpdateDependencyHookInvocationTestCase
- Tests for the invocation of hook_update_dependencies().
Code
function testHookUpdateDependencies() {
$update_dependencies = update_retrieve_dependencies();
$this->assertTrue($update_dependencies['system'][7000]['update_test_1'] == 7000, 'An update function that has a dependency on two separate modules has the first dependency recorded correctly.');
$this->assertTrue($update_dependencies['system'][7000]['update_test_2'] == 7001, 'An update function that has a dependency on two separate modules has the second dependency recorded correctly.');
$this->assertTrue($update_dependencies['system'][7001]['update_test_1'] == 7002, 'An update function that depends on more than one update from the same module only has the dependency on the higher-numbered update function recorded.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.