You are here

public function DependencyOrderingTest::testUpdateOrderingSingleModule in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php \Drupal\Tests\system\Functional\UpdateSystem\DependencyOrderingTest::testUpdateOrderingSingleModule()

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

File

core/modules/system/tests/src/Functional/UpdateSystem/DependencyOrderingTest.php, line 39

Class

DependencyOrderingTest
Tests that update functions are run in the proper order.

Namespace

Drupal\Tests\system\Functional\UpdateSystem

Code

public function testUpdateOrderingSingleModule() {
  $starting_updates = [
    'update_test_1' => 8001,
  ];
  $expected_updates = [
    'update_test_1_update_8001',
    'update_test_1_update_8002',
    'update_test_1_update_8003',
  ];
  $actual_updates = array_keys(update_resolve_dependencies($starting_updates));
  $this
    ->assertEquals($expected_updates, $actual_updates, 'Updates within a single module run in the correct order.');
}