Loading core/lib/Drupal/Core/Update/UpdateRegistry.php +2 −2 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ public function getRemovedPostUpdates($extension) { * Gets all available update functions. * * @return callable[] * A list of update functions. * An alphabetical list of available update functions. */ protected function getAvailableUpdateFunctions() { $regexp = '/^(?<extension>.+)_' . $this->updateType . '_(?<name>.+)$/'; Loading Loading @@ -163,7 +163,7 @@ protected function getAvailableUpdateFunctions() { * Find all update functions that haven't been executed. * * @return callable[] * A list of update functions. * An alphabetical list of update functions that have not been executed. */ public function getPendingUpdateFunctions() { // We need a) the list of active extensions (we get that from the config Loading core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php +5 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,7 @@ public function testGetPendingUpdateFunctionsNoExistingUpdates() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $this->assertEquals([ 'module_a_post_update_a', 'module_a_post_update_b', Loading Loading @@ -250,6 +251,7 @@ public function testGetPendingUpdateFunctionsWithLoadedModulesButNotEnabled() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $this->assertEquals([ 'module_a_post_update_a', 'module_a_post_update_b', Loading Loading @@ -294,6 +296,7 @@ public function testGetPendingUpdateFunctionsExistingUpdates() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $this->assertEquals(array_values([ 'module_a_post_update_b', 'module_b_post_update_a', Loading Loading @@ -336,6 +339,7 @@ public function testGetPendingUpdateInformation() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $expected = []; $expected['module_a']['pending']['a'] = 'Module A update A.'; $expected['module_a']['pending']['b'] = 'Module A update B.'; Loading Loading @@ -387,6 +391,7 @@ public function testGetPendingUpdateInformationWithExistingUpdates() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $expected = []; $expected['module_a']['pending']['b'] = 'Module A update B.'; $expected['module_a']['start'] = 'b'; Loading Loading
core/lib/Drupal/Core/Update/UpdateRegistry.php +2 −2 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ public function getRemovedPostUpdates($extension) { * Gets all available update functions. * * @return callable[] * A list of update functions. * An alphabetical list of available update functions. */ protected function getAvailableUpdateFunctions() { $regexp = '/^(?<extension>.+)_' . $this->updateType . '_(?<name>.+)$/'; Loading Loading @@ -163,7 +163,7 @@ protected function getAvailableUpdateFunctions() { * Find all update functions that haven't been executed. * * @return callable[] * A list of update functions. * An alphabetical list of update functions that have not been executed. */ public function getPendingUpdateFunctions() { // We need a) the list of active extensions (we get that from the config Loading
core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php +5 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,7 @@ public function testGetPendingUpdateFunctionsNoExistingUpdates() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $this->assertEquals([ 'module_a_post_update_a', 'module_a_post_update_b', Loading Loading @@ -250,6 +251,7 @@ public function testGetPendingUpdateFunctionsWithLoadedModulesButNotEnabled() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $this->assertEquals([ 'module_a_post_update_a', 'module_a_post_update_b', Loading Loading @@ -294,6 +296,7 @@ public function testGetPendingUpdateFunctionsExistingUpdates() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $this->assertEquals(array_values([ 'module_a_post_update_b', 'module_b_post_update_a', Loading Loading @@ -336,6 +339,7 @@ public function testGetPendingUpdateInformation() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $expected = []; $expected['module_a']['pending']['a'] = 'Module A update A.'; $expected['module_a']['pending']['b'] = 'Module A update B.'; Loading Loading @@ -387,6 +391,7 @@ public function testGetPendingUpdateInformationWithExistingUpdates() { ], ], $key_value, $theme_handler, 'post_update'); // Confirm the updates are sorted alphabetically. $expected = []; $expected['module_a']['pending']['b'] = 'Module A update B.'; $expected['module_a']['start'] = 'b'; Loading