Skip to content
Snippets Groups Projects
Verified Commit d5ffb679 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3121155 by quietone, lauriii, bnjmnm, tedbow: Add comments about...

Issue #3121155 by quietone, lauriii, bnjmnm, tedbow: Add comments about alphabetical sorting in UpdateRegistry and test

(cherry picked from commit 218f375f)
parent 90baffa4
Branches
Tags
15 merge requests!10602Issue #3438769 by vinmayiswamy, antonnavi, michelle, amateescu: Sub workspace does not clear,!10301Issue #3469309 by mstrelan, smustgrave, moshe weitzman: Use one-time login...,!10187Issue #3487488 by dakwamine: ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip,!9929Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9787Resolve issue 3479427 - bootstrap barrio issue under Windows,!9742Issue #3463908 by catch, quietone: Split OptionsFieldUiTest into two,!9526Issue #3458177 by mondrake, catch, quietone, godotislate, longwave, larowlan,...,!8949Backport .gitlabci.yml changes.,!8738Issue #3424162 by camilledavis, dineshkumarbollu, smustgrave: Claro...,!8704Make greek characters available in ckeditor5,!8533Issue #3446962 by kim.pepper: Remove incorrectly added...,!8517Issue #3443748 by NexusNovaz, smustgrave: Testcase creates false positive,!6502Draft: Resolve #2938524 "Plach testing issue",!38582585169-10.1.x,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key
Pipeline #197117 canceled
...@@ -131,7 +131,7 @@ public function getRemovedPostUpdates($extension) { ...@@ -131,7 +131,7 @@ public function getRemovedPostUpdates($extension) {
* Gets all available update functions. * Gets all available update functions.
* *
* @return callable[] * @return callable[]
* A list of update functions. * An alphabetical list of available update functions.
*/ */
protected function getAvailableUpdateFunctions() { protected function getAvailableUpdateFunctions() {
$regexp = '/^(?<extension>.+)_' . $this->updateType . '_(?<name>.+)$/'; $regexp = '/^(?<extension>.+)_' . $this->updateType . '_(?<name>.+)$/';
...@@ -163,7 +163,7 @@ protected function getAvailableUpdateFunctions() { ...@@ -163,7 +163,7 @@ protected function getAvailableUpdateFunctions() {
* Find all update functions that haven't been executed. * Find all update functions that haven't been executed.
* *
* @return callable[] * @return callable[]
* A list of update functions. * An alphabetical list of update functions that have not been executed.
*/ */
public function getPendingUpdateFunctions() { public function getPendingUpdateFunctions() {
// We need a) the list of active extensions (we get that from the config // We need a) the list of active extensions (we get that from the config
......
...@@ -213,6 +213,7 @@ public function testGetPendingUpdateFunctionsNoExistingUpdates() { ...@@ -213,6 +213,7 @@ public function testGetPendingUpdateFunctionsNoExistingUpdates() {
], ],
], $key_value, $theme_handler, 'post_update'); ], $key_value, $theme_handler, 'post_update');
// Confirm the updates are sorted alphabetically.
$this->assertEquals([ $this->assertEquals([
'module_a_post_update_a', 'module_a_post_update_a',
'module_a_post_update_b', 'module_a_post_update_b',
...@@ -250,6 +251,7 @@ public function testGetPendingUpdateFunctionsWithLoadedModulesButNotEnabled() { ...@@ -250,6 +251,7 @@ public function testGetPendingUpdateFunctionsWithLoadedModulesButNotEnabled() {
], ],
], $key_value, $theme_handler, 'post_update'); ], $key_value, $theme_handler, 'post_update');
// Confirm the updates are sorted alphabetically.
$this->assertEquals([ $this->assertEquals([
'module_a_post_update_a', 'module_a_post_update_a',
'module_a_post_update_b', 'module_a_post_update_b',
...@@ -294,6 +296,7 @@ public function testGetPendingUpdateFunctionsExistingUpdates() { ...@@ -294,6 +296,7 @@ public function testGetPendingUpdateFunctionsExistingUpdates() {
], ],
], $key_value, $theme_handler, 'post_update'); ], $key_value, $theme_handler, 'post_update');
// Confirm the updates are sorted alphabetically.
$this->assertEquals(array_values([ $this->assertEquals(array_values([
'module_a_post_update_b', 'module_a_post_update_b',
'module_b_post_update_a', 'module_b_post_update_a',
...@@ -336,6 +339,7 @@ public function testGetPendingUpdateInformation() { ...@@ -336,6 +339,7 @@ public function testGetPendingUpdateInformation() {
], ],
], $key_value, $theme_handler, 'post_update'); ], $key_value, $theme_handler, 'post_update');
// Confirm the updates are sorted alphabetically.
$expected = []; $expected = [];
$expected['module_a']['pending']['a'] = 'Module A update A.'; $expected['module_a']['pending']['a'] = 'Module A update A.';
$expected['module_a']['pending']['b'] = 'Module A update B.'; $expected['module_a']['pending']['b'] = 'Module A update B.';
...@@ -387,6 +391,7 @@ public function testGetPendingUpdateInformationWithExistingUpdates() { ...@@ -387,6 +391,7 @@ public function testGetPendingUpdateInformationWithExistingUpdates() {
], ],
], $key_value, $theme_handler, 'post_update'); ], $key_value, $theme_handler, 'post_update');
// Confirm the updates are sorted alphabetically.
$expected = []; $expected = [];
$expected['module_a']['pending']['b'] = 'Module A update B.'; $expected['module_a']['pending']['b'] = 'Module A update B.';
$expected['module_a']['start'] = 'b'; $expected['module_a']['start'] = 'b';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment