You are here

function UpdateDependencyOrderingTestCase::testUpdateOrderingSingleModule in Drupal 7

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

File

modules/simpletest/tests/update.test, line 28
Tests for the update system.

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.');
}