function UpdateOrderingTest::testUpdateOrdering

Tests updates to ensure without dependencies system updates come first.

File

core/tests/Drupal/Tests/Core/Update/UpdateOrderingTest.php, line 65

Class

UpdateOrderingTest
Tests update ordering.

Namespace

Drupal\Tests\Core\Update

Code

public function testUpdateOrdering() : void {
  $updates = update_resolve_dependencies([
    'a_module' => 9000,
    'system' => '9000',
    'z_module' => 9000,
  ]);
  $this->assertSame([
    'system_update_9000',
    'system_update_9001',
    'z_module_update_9000',
    'z_module_update_9001',
    'a_module_update_9000',
  ], array_keys($updates));
}

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