function DependencyOrderingTest::testUpdateOrderingSingleModule

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

File

drupal/core/modules/system/lib/Drupal/system/Tests/Update/DependencyOrderingTest.php, line 40
Definition of Drupal\system\Tests\Update\DependencyOrderingTest.

Class

DependencyOrderingTest
Tests the update dependency ordering system.

Namespace

Drupal\system\Tests\Update

Code

function testUpdateOrderingSingleModule() {
  $starting_updates = array(
    'update_test_1' => 8000,
  );
  $expected_updates = array(
    'update_test_1_update_8000',
    'update_test_1_update_8001',
    'update_test_1_update_8002',
  );
  $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.');
}