function UpdateOrderingTest::testUpdateOrderingWithDependency
Tests update ordering with a dependency.
File
-
core/
tests/ Drupal/ Tests/ Core/ Update/ UpdateOrderingTest.php, line 79
Class
- UpdateOrderingTest
- Tests update ordering.
Namespace
Drupal\Tests\Core\UpdateCode
public function testUpdateOrderingWithDependency() : void {
// Indicate that the a_module_update_9000() function must run before the
// system_update_9000() function.
static::$updateDependenciesHookReturn['system'][9000] = [
'a_module' => 9000,
];
$updates = update_resolve_dependencies([
'a_module' => 9000,
'system' => '9000',
'z_module' => 9000,
]);
$this->assertSame([
'a_module_update_9000',
'system_update_9000',
'system_update_9001',
'z_module_update_9000',
'z_module_update_9001',
], array_keys($updates));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.