diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-alpha1.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-alpha1.xml
new file mode 100644
index 000000000000..61776abbdf74
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-alpha1.xml
@@ -0,0 +1,52 @@
+
+
+ AAA Update test
+ aaa_update_test
+ Drupal
+ 8.x
+ 1
+ 1
+ 1
+ published
+ http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1073781824
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-beta1.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-beta1.xml
new file mode 100644
index 000000000000..4cb6e450a56a
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1-beta1.xml
@@ -0,0 +1,70 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1073781824
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.1_1.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1.xml
new file mode 100644
index 000000000000..14e9e7c1699e
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_1.xml
@@ -0,0 +1,87 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-1.1
+ 8.x-1.1
+ DRUPAL-8--1-1
+ 1
+ 1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-release
+ http://example.com/aaa_update_test-8.x-1.1.tar.gz
+ 1250424521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1250404521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.1_2-alpha1.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.1_2-alpha1.xml
new file mode 100644
index 000000000000..f9541c8f5f4f
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_2-alpha1.xml
@@ -0,0 +1,105 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-1.2-alpha1
+ 8.x-1.2-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 2
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.2-alpha1.tar.gz
+ 1250413521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1
+ 8.x-1.1
+ DRUPAL-8--1-1
+ 1
+ 1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-release
+ http://example.com/aaa_update_test-8.x-1.1.tar.gz
+ 1250424521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1250404521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.1_2-beta1.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.1_2-beta1.xml
new file mode 100644
index 000000000000..e166b3af9833
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_2-beta1.xml
@@ -0,0 +1,123 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-1.2-beta1
+ 8.x-1.2-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 2
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-beta1-release
+ http://example.com/aaa_update_test-8.x-1.2-beta1.tar.gz
+ 1250412521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-alpha1
+ 8.x-1.2-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 2
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.2-alpha1.tar.gz
+ 1250413521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1
+ 8.x-1.1
+ DRUPAL-8--1-1
+ 1
+ 1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-release
+ http://example.com/aaa_update_test-8.x-1.1.tar.gz
+ 1250424521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1250404521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.1_2.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.1_2.xml
new file mode 100644
index 000000000000..d3d30934f744
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.1_2.xml
@@ -0,0 +1,140 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-1.2
+ 8.x-1.2
+ DRUPAL-8--1-1
+ 1
+ 2
+ published
+ http://example.com/aaa_update_test-8-x-1-2-release
+ http://example.com/aaa_update_test-8.x-1.2.tar.gz
+ 1250421521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-beta1
+ 8.x-1.2-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 2
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-beta1-release
+ http://example.com/aaa_update_test-8.x-1.2-beta1.tar.gz
+ 1250412521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-alpha1
+ 8.x-1.2-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 2
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.2-alpha1.tar.gz
+ 1250413521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1
+ 8.x-1.1
+ DRUPAL-8--1-1
+ 1
+ 1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-release
+ http://example.com/aaa_update_test-8.x-1.1.tar.gz
+ 1250424521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1250404521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.2_0-alpha1.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.2_0-alpha1.xml
new file mode 100644
index 000000000000..799abdbd3dd0
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.2_0-alpha1.xml
@@ -0,0 +1,158 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1,2
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-2.0-alpha1
+ 8.x-2.0-alpha1
+ DRUPAL-8--2-0
+ 2
+ 0
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-2-0-alpha1-release
+ http://example.com/aaa_update_test-8.x-2.0-alpha1.tar.gz
+ 1250422521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2
+ 8.x-1.2
+ DRUPAL-8--1-1
+ 1
+ 2
+ published
+ http://example.com/aaa_update_test-8-x-1-2-release
+ http://example.com/aaa_update_test-8.x-1.2.tar.gz
+ 1250421521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-beta1
+ 8.x-1.2-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 2
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-beta1-release
+ http://example.com/aaa_update_test-8.x-1.2-beta1.tar.gz
+ 1250412521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-alpha1
+ 8.x-1.2-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 2
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.2-alpha1.tar.gz
+ 1250413521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1
+ 8.x-1.1
+ DRUPAL-8--1-1
+ 1
+ 1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-release
+ http://example.com/aaa_update_test-8.x-1.1.tar.gz
+ 1250424521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1250404521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.2_0-beta1.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.2_0-beta1.xml
new file mode 100644
index 000000000000..e82a27f051df
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.2_0-beta1.xml
@@ -0,0 +1,176 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1,2
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-2.0-beta1
+ 8.x-2.0-beta1
+ DRUPAL-8--2-0
+ 2
+ 0
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-2-0-beta1-release
+ http://example.com/aaa_update_test-8.x-2.0-beta1.tar.gz
+ 1250422521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073782824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-2.0-alpha1
+ 8.x-2.0-alpha1
+ DRUPAL-8--2-0
+ 2
+ 0
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-2-0-alpha1-release
+ http://example.com/aaa_update_test-8.x-2.0-alpha1.tar.gz
+ 1250422521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2
+ 8.x-1.2
+ DRUPAL-8--1-1
+ 1
+ 2
+ published
+ http://example.com/aaa_update_test-8-x-1-2-release
+ http://example.com/aaa_update_test-8.x-1.2.tar.gz
+ 1250421521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-beta1
+ 8.x-1.2-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 2
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-beta1-release
+ http://example.com/aaa_update_test-8.x-1.2-beta1.tar.gz
+ 1250412521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-alpha1
+ 8.x-1.2-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 2
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.2-alpha1.tar.gz
+ 1250413521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1
+ 8.x-1.1
+ DRUPAL-8--1-1
+ 1
+ 1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-release
+ http://example.com/aaa_update_test-8.x-1.1.tar.gz
+ 1250424521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1250404521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/modules/update_test/aaa_update_test.2_0.xml b/core/modules/update/tests/modules/update_test/aaa_update_test.2_0.xml
new file mode 100644
index 000000000000..240f0db4fb38
--- /dev/null
+++ b/core/modules/update/tests/modules/update_test/aaa_update_test.2_0.xml
@@ -0,0 +1,193 @@
+
+
+AAA Update test
+aaa_update_test
+Drupal
+8.x
+1
+1,2
+1
+published
+http://example.com/project/aaa_update_test
+
+ ProjectsModules
+
+
+
+ aaa_update_test 8.x-2.0
+ 8.x-2.0
+ DRUPAL-8--2-0
+ 2
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-2-0-release
+ http://example.com/aaa_update_test-8.x-2.0.tar.gz
+ 1250422521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-2.0-beta1
+ 8.x-2.0-beta1
+ DRUPAL-8--2-0
+ 2
+ 0
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-2-0-beta1-release
+ http://example.com/aaa_update_test-8.x-2.0-beta1.tar.gz
+ 1250422521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073782824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-2.0-alpha1
+ 8.x-2.0-alpha1
+ DRUPAL-8--2-0
+ 2
+ 0
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-2-0-alpha1-release
+ http://example.com/aaa_update_test-8.x-2.0-alpha1.tar.gz
+ 1250422521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2
+ 8.x-1.2
+ DRUPAL-8--1-1
+ 1
+ 2
+ published
+ http://example.com/aaa_update_test-8-x-1-2-release
+ http://example.com/aaa_update_test-8.x-1.2.tar.gz
+ 1250421521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-beta1
+ 8.x-1.2-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 2
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-beta1-release
+ http://example.com/aaa_update_test-8.x-1.2-beta1.tar.gz
+ 1250412521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.2-alpha1
+ 8.x-1.2-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 2
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-2-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.2-alpha1.tar.gz
+ 1250413521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1
+ 8.x-1.1
+ DRUPAL-8--1-1
+ 1
+ 1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-release
+ http://example.com/aaa_update_test-8.x-1.1.tar.gz
+ 1250424521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073751824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-beta1
+ 8.x-1.1-beta1
+ DRUPAL-8--1-1-beta1
+ 1
+ 1
+ beta1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-beta1-release
+ http://example.com/aaa_update_test-8.x-1.1-beta1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073741824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.1-alpha1
+ 8.x-1.1-alpha1
+ DRUPAL-8--1-1-alpha1
+ 1
+ 1
+ alpha1
+ published
+ http://example.com/aaa_update_test-8-x-1-1-alpha1-release
+ http://example.com/aaa_update_test-8.x-1.1-alpha1.tar.gz
+ 1250414521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073761824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+ aaa_update_test 8.x-1.0
+ 8.x-1.0
+ DRUPAL-8--1-0
+ 1
+ 0
+ published
+ http://example.com/aaa_update_test-8-x-1-0-release
+ http://example.com/aaa_update_test-8.x-1.0.tar.gz
+ 1250404521
+ b966255555d9c9b86d480ca08cfaa98e
+ 1073781824
+
+ Release typeNew features
+ Release typeBug fixes
+
+
+
+
diff --git a/core/modules/update/tests/src/Functional/UpdateContribTest.php b/core/modules/update/tests/src/Functional/UpdateContribTest.php
index 07cbcb31bac3..72daa9631598 100644
--- a/core/modules/update/tests/src/Functional/UpdateContribTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php
@@ -15,6 +15,16 @@ use Drupal\update\UpdateManagerInterface;
*/
class UpdateContribTest extends UpdateTestBase {
+ /**
+ * {@inheritdoc}
+ */
+ protected $updateTableLocator = 'table.update:nth-of-type(2)';
+
+ /**
+ * {@inheritdoc}
+ */
+ protected $updateProject = 'aaa_update_test';
+
/**
* Modules to enable.
*
@@ -227,6 +237,98 @@ class UpdateContribTest extends UpdateTestBase {
$this->assertRaw(Link::fromTextAndUrl(t('Update test base theme'), Url::fromUri('http://example.com/project/update_test_basetheme'))->toString(), 'Link to the Update test base theme project appears.');
}
+ /**
+ * Tests the Update Manager module when one normal update is available.
+ */
+ public function testNormalUpdateAvailable() {
+ $assert_session = $this->assertSession();
+ // Ensure that the update check requires a token.
+ $this->drupalGet('admin/reports/updates/check');
+ $assert_session->statusCodeEquals(403);
+
+ $system_info = [
+ 'aaa_update_test' => [
+ 'project' => 'aaa_update_test',
+ 'version' => '8.x-1.0',
+ 'hidden' => FALSE,
+ ],
+ ];
+ $this->config('update_test.settings')->set('system_info', $system_info)->save();
+
+ foreach (['1.1', '1.2', '2.0'] as $version) {
+ foreach (['-beta1', '-alpha1', ''] as $extra_version) {
+ $full_version = "8.x-$version$extra_version";
+ $this->refreshUpdateStatus([
+ 'drupal' => '0.0',
+ 'aaa_update_test' => str_replace('.', '_', $version) . $extra_version,
+ ]);
+ $this->standardTests();
+ $this->drupalGet('admin/reports/updates');
+ $this->clickLink('Check manually');
+ $this->checkForMetaRefresh();
+ $assert_session->pageTextNotContains('Security update required!');
+ // Set a CSS selector in order for assertions to target the 'Modules'
+ // table and not Drupal core updates.
+ $this->updateTableLocator = 'table.update:nth-of-type(2)';
+ switch ($version) {
+ case '1.1':
+ // Both stable and unstable releases are available.
+ // A stable release is the latest.
+ if ($extra_version == '') {
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Up to date');
+ $assert_session->elementTextContains('css', $this->updateTableLocator, 'Update available');
+ $this->assertVersionUpdateLinks('Recommended version', $full_version);
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Latest version:');
+ $assert_session->elementContains('css', $this->updateTableLocator, 'warning.svg');
+ }
+ // Only unstable releases are available.
+ // An unstable release is the latest.
+ else {
+ $assert_session->elementTextContains('css', $this->updateTableLocator, 'Up to date');
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Update available');
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Recommended version:');
+ $this->assertVersionUpdateLinks('Latest version', $full_version);
+ $assert_session->elementContains('css', $this->updateTableLocator, 'check.svg');
+ }
+ break;
+
+ case '1.2':
+ // Both stable and unstable releases are available.
+ // A stable release is the latest.
+ if ($extra_version == '') {
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Up to date');
+ $assert_session->elementTextContains('css', $this->updateTableLocator, 'Update available');
+ $this->assertVersionUpdateLinks('Recommended version:', $full_version);
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Latest version:');
+ $assert_session->elementContains('css', $this->updateTableLocator, 'warning.svg');
+ }
+ // Both stable and unstable releases are available.
+ // An unstable release is the latest.
+ else {
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Up to date');
+ $assert_session->elementTextContains('css', $this->updateTableLocator, 'Update available');
+ $this->assertVersionUpdateLinks('Recommended version:', '8.x-1.1');
+ $this->assertVersionUpdateLinks('Latest version:', $full_version);
+ $assert_session->elementTextContains('css', $this->updateTableLocator, 'Latest version:');
+ $assert_session->elementContains('css', $this->updateTableLocator, 'warning.svg');
+ }
+ break;
+
+ case '2.0':
+ // When next major release (either stable or unstable) is available
+ // and the current major is still supported, the next major will be
+ // listed as "Also available".
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Up to date');
+ $assert_session->elementTextContains('css', $this->updateTableLocator, 'Update available');
+ $this->assertVersionUpdateLinks('Recommended version', '8.x-1.2');
+ $this->assertVersionUpdateLinks('Also available', $full_version);
+ $assert_session->elementTextNotContains('css', $this->updateTableLocator, 'Latest version:');
+ $assert_session->elementContains('css', $this->updateTableLocator, 'warning.svg');
+ }
+ }
+ }
+ }
+
/**
* Tests that disabled themes are only shown when desired.
*
diff --git a/core/modules/update/tests/src/Functional/UpdateCoreTest.php b/core/modules/update/tests/src/Functional/UpdateCoreTest.php
index d0b0b9330197..26e9d5d96973 100644
--- a/core/modules/update/tests/src/Functional/UpdateCoreTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateCoreTest.php
@@ -28,6 +28,16 @@ class UpdateCoreTest extends UpdateTestBase {
*/
protected $defaultTheme = 'stark';
+ /**
+ * {@inheritdoc}
+ */
+ protected $updateTableLocator = 'table.update';
+
+ /**
+ * {@inheritdoc}
+ */
+ protected $updateProject = 'drupal';
+
protected function setUp() {
parent::setUp();
$admin_user = $this->drupalCreateUser(['administer site configuration', 'administer modules', 'administer themes']);
@@ -81,16 +91,13 @@ class UpdateCoreTest extends UpdateTestBase {
foreach ([0, 1] as $minor_version) {
foreach (['-alpha1', '-beta1', ''] as $extra_version) {
+ $full_version = "8.$minor_version.1$extra_version";
$this->refreshUpdateStatus(['drupal' => "$minor_version.1" . $extra_version]);
$this->standardTests();
$this->drupalGet('admin/reports/updates');
$this->clickLink(t('Check manually'));
$this->checkForMetaRefresh();
$this->assertNoText(t('Security update required!'));
- $this->assertRaw(Link::fromTextAndUrl("8.$minor_version.1" . $extra_version, Url::fromUri("http://example.com/drupal-8-$minor_version-1$extra_version-release"))->toString(), 'Link to release appears.');
- $this->assertRaw(Link::fromTextAndUrl(t('Download'), Url::fromUri("http://example.com/drupal-8-$minor_version-1$extra_version.tar.gz"))->toString(), 'Link to download appears.');
- $this->assertRaw(Link::fromTextAndUrl(t('Release notes'), Url::fromUri("http://example.com/drupal-8-$minor_version-1$extra_version-release"))->toString(), 'Link to release notes appears.');
-
switch ($minor_version) {
case 0:
// Both stable and unstable releases are available.
@@ -98,7 +105,7 @@ class UpdateCoreTest extends UpdateTestBase {
if ($extra_version == '') {
$this->assertNoText(t('Up to date'));
$this->assertText(t('Update available'));
- $this->assertText(t('Recommended version:'));
+ $this->assertVersionUpdateLinks('Recommended version:', $full_version);
$this->assertNoText(t('Latest version:'));
$this->assertRaw('warning.svg', 'Warning icon was found.');
}
@@ -108,7 +115,7 @@ class UpdateCoreTest extends UpdateTestBase {
$this->assertText(t('Up to date'));
$this->assertNoText(t('Update available'));
$this->assertNoText(t('Recommended version:'));
- $this->assertText(t('Latest version:'));
+ $this->assertVersionUpdateLinks('Latest version:', $full_version);
$this->assertRaw('check.svg', 'Check icon was found.');
}
break;
@@ -118,7 +125,7 @@ class UpdateCoreTest extends UpdateTestBase {
if ($extra_version == '') {
$this->assertNoText(t('Up to date'));
$this->assertText(t('Update available'));
- $this->assertText(t('Recommended version:'));
+ $this->assertVersionUpdateLinks('Recommended version:', $full_version);
$this->assertNoText(t('Latest version:'));
$this->assertRaw('warning.svg', 'Warning icon was found.');
}
@@ -127,8 +134,8 @@ class UpdateCoreTest extends UpdateTestBase {
else {
$this->assertNoText(t('Up to date'));
$this->assertText(t('Update available'));
- $this->assertText(t('Recommended version:'));
- $this->assertText(t('Latest version:'));
+ $this->assertVersionUpdateLinks('Recommended version:', '8.1.0');
+ $this->assertVersionUpdateLinks('Latest version:', $full_version);
$this->assertRaw('warning.svg', 'Warning icon was found.');
}
break;
@@ -565,4 +572,15 @@ class UpdateCoreTest extends UpdateTestBase {
$this->assertUrl('admin/reports/updates/install');
}
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function assertVersionUpdateLinks($label, $version, $download_version = NULL) {
+ // Test XML files for Drupal core use '-' in the version number for the
+ // download link.
+ $download_version = str_replace('.', '-', $version);
+ parent::assertVersionUpdateLinks($label, $version, $download_version);
+ }
+
}
diff --git a/core/modules/update/tests/src/Functional/UpdateTestBase.php b/core/modules/update/tests/src/Functional/UpdateTestBase.php
index ca826f16303f..89cfdf4f6e28 100644
--- a/core/modules/update/tests/src/Functional/UpdateTestBase.php
+++ b/core/modules/update/tests/src/Functional/UpdateTestBase.php
@@ -41,6 +41,20 @@ abstract class UpdateTestBase extends BrowserTestBase {
*/
const UPDATE_NONE = 'UPDATE_NONE';
+ /**
+ * The CSS locator for the update table run asserts on.
+ *
+ * @var string
+ */
+ protected $updateTableLocator;
+
+ /**
+ * The project that is being tested.
+ *
+ * @var string
+ */
+ protected $updateProject;
+
protected function setUp() {
parent::setUp();
@@ -168,4 +182,26 @@ abstract class UpdateTestBase extends BrowserTestBase {
}
}
+ /**
+ * Asserts that an update version has the correct links.
+ *
+ * @param string $label
+ * The label for the update.
+ * @param string $version
+ * The project version.
+ * @param string|null $download_version
+ * (optional) The version number as it appears in the download link. If
+ * $download_version is not provided then $version will be used.
+ */
+ protected function assertVersionUpdateLinks($label, $version, $download_version = NULL) {
+ $download_version = $download_version ?? $version;
+ $update_element = $this->getSession()->getPage()->find('css', $this->updateTableLocator . " .project-update__version:contains(\"$label\")");
+ // In the release notes URL the periods are replaced with dashes.
+ $url_version = str_replace('.', '-', $version);
+
+ $this->assertEquals($update_element->findLink($version)->getAttribute('href'), "http://example.com/{$this->updateProject}-$url_version-release");
+ $this->assertEquals($update_element->findLink('Download')->getAttribute('href'), "http://example.com/{$this->updateProject}-$download_version.tar.gz");
+ $this->assertEquals($update_element->findLink('Release notes')->getAttribute('href'), "http://example.com/{$this->updateProject}-$url_version-release");
+ }
+
}