function UpdateDependencyOrderingTestCase::testUpdateOrderingSingleModule

Test that updates within a single module run in the correct order.

File

modules/simpletest/tests/update.test, line 28

Class

UpdateDependencyOrderingTestCase
Tests for the update dependency ordering system.

Code

function testUpdateOrderingSingleModule() {
    $starting_updates = array(
        'update_test_1' => 7000,
    );
    $expected_updates = array(
        'update_test_1_update_7000',
        'update_test_1_update_7001',
        'update_test_1_update_7002',
    );
    $actual_updates = array_keys(update_resolve_dependencies($starting_updates));
    $this->assertEqual($expected_updates, $actual_updates, 'Updates within a single module run in the correct order.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.