Commit d3d2a5ce authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #3113292 by dww, tedbow, xjm, tim.plunkett: Update module has no tests...

Issue #3113292 by dww, tedbow, xjm, tim.plunkett: Update module has no tests for changes to status of the installed release (revoked, etc)
parent 28e24f87
<?xml version="1.0" encoding="utf-8"?>
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>AAA Update test</title>
<short_name>aaa_update_test</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>8.x-1.,8.x-2.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/aaa_update_test</link>
<terms>
<term><name>Projects</name><value>Modules</value></term>
</terms>
<releases>
<release>
<name>aaa_update_test 8.x-2.0</name>
<version>8.x-2.0</version>
<tag>8.x-2.0</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-2.0.tar.gz</download_link>
<date>1250422521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-2.0-beta1</name>
<version>8.x-2.0-beta1</version>
<tag>8.x-2.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-beta1-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-2.0-beta1.tar.gz</download_link>
<date>1250422521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-2.0-alpha1</name>
<version>8.x-2.0-alpha1</version>
<tag>8.x-2.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-alpha1-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-2.0-alpha1.tar.gz</download_link>
<date>1250422521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-1.1</name>
<version>8.x-1.1</version>
<tag>8.x-1.1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-1-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-1.1.tar.gz</download_link>
<date>1250404525</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Unsupported</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-1.0</name>
<version>8.x-1.0</version>
<tag>8.x-1.0</tag>
<status>unpublished</status>
<release_link>http://example.com/aaa_update_test-8-x-1-0-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-1.0.tar.gz</download_link>
<date>1250404521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
</releases>
</project>
<?xml version="1.0" encoding="utf-8"?>
<!--
This XML file is the exact same as the file aaa_update_test.1_0-supported.xml
except 'supported_branches' in this file does not contain the '8.x-1.' branch.
Therefore, all the releases that start with '8.x-1.' are in an unsupported
branch.
-->
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>AAA Update test</title>
<short_name>aaa_update_test</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>8.x-2.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/aaa_update_test</link>
<terms>
<term><name>Projects</name><value>Modules</value></term>
</terms>
<releases>
<release>
<name>aaa_update_test 8.x-2.0</name>
<version>8.x-2.0</version>
<tag>8.x-2.0</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-2.0.tar.gz</download_link>
<date>1250422521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-2.0-beta1</name>
<version>8.x-2.0-beta1</version>
<tag>8.x-2.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-beta1-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-2.0-beta1.tar.gz</download_link>
<date>1250422521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-2.0-alpha1</name>
<version>8.x-2.0-alpha1</version>
<tag>8.x-2.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-alpha1-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-2.0-alpha1.tar.gz</download_link>
<date>1250422521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-1.1</name>
<version>8.x-1.1</version>
<tag>8.x-1.1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-1-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-1.1.tar.gz</download_link>
<date>1250404525</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Unsupported</value></term>
</terms>
</release>
<release>
<name>aaa_update_test 8.x-1.0</name>
<version>8.x-1.0</version>
<tag>8.x-1.0</tag>
<status>unpublished</status>
<release_link>http://example.com/aaa_update_test-8-x-1-0-release</release_link>
<download_link>http://example.com/aaa_update_test-8.x-1.0.tar.gz</download_link>
<date>1250404521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
</releases>
</project>
<?xml version="1.0" encoding="utf-8"?>
<!--
This XML file is the exact same as the file drupal.1.xml except
'supported_branches' in this file does not contain the '8.0.' branch. Therefore,
all the releases that start with '8.0.' are in an unsupported branch.
-->
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>Drupal</title>
<short_name>drupal</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>8.1.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/drupal</link>
<terms>
<term><name>Projects</name><value>Drupal project</value></term>
</terms>
<releases>
<release>
<name>Drupal 8.1.0</name>
<version>8.1.0</version>
<tag>8.1.0</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-1-0-release</release_link>
<download_link>http://example.com/drupal-8-1-0.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.1.0-beta1</name>
<version>8.1.0-beta1</version>
<tag>8.1.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-1-0-beta1-release</release_link>
<download_link>http://example.com/drupal-8-1-0-beta1.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.1.0-alpha1</name>
<version>8.1.0-alpha1</version>
<tag>8.1.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-1-0-alpha1-release</release_link>
<download_link>http://example.com/drupal-8-1-0-alpha1.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.3</name>
<version>8.0.3</version>
<tag>8.0.3</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-3-release</release_link>
<download_link>http://example.com/drupal-8-0-3.tar.gz</download_link>
<date>1250424585</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Unsupported</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.2</name>
<version>8.0.2</version>
<tag>8.0.2</tag>
<status>unpublished</status>
<release_link>http://example.com/drupal-8-0-2-release</release_link>
<download_link>http://example.com/drupal-8-0-2.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.1</name>
<version>8.0.1</version>
<tag>8.0.1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-1-release</release_link>
<download_link>http://example.com/drupal-8-0-1.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.1-beta1</name>
<version>8.0.1-beta1</version>
<tag>8.0.1-beta1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-1-beta1-release</release_link>
<download_link>http://example.com/drupal-8-0-1-beta1.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.1-alpha1</name>
<version>8.0.1-alpha1</version>
<tag>8.0.1-alpha1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-1-alpha1-release</release_link>
<download_link>http://example.com/drupal-8-0-1-alpha1.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.0</name>
<version>8.0.0</version>
<tag>8.0.0</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-0-release</release_link>
<download_link>http://example.com/drupal-8-0-0.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.0-beta1</name>
<version>8.0.0-beta1</version>
<tag>8.0.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-0-beta1-release</release_link>
<download_link>http://example.com/drupal-8-0-0-beta1.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.0-alpha1</name>
<version>8.0.0-alpha1</version>
<tag>8.0.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-0-alpha1-release</release_link>
<download_link>http://example.com/drupal-8-0-0-alpha1.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
</releases>
</project>
......@@ -63,6 +63,33 @@
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.3</name>
<version>8.0.3</version>
<tag>8.0.3</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-3-release</release_link>
<download_link>http://example.com/drupal-8-0-3.tar.gz</download_link>
<date>1250424585</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Unsupported</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.2</name>
<version>8.0.2</version>
<tag>8.0.2</tag>
<status>unpublished</status>
<release_link>http://example.com/drupal-8-0-2-release</release_link>
<download_link>http://example.com/drupal-8-0-2.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.1</name>
<version>8.0.1</version>
......
<?xml version="1.0" encoding="utf-8"?>
<!--
This XML file is the exact same as the file drupal.sec.1.2_insecure.xml except
'supported_branches' in this file does not contain the '8.0.' branch. Therefore,
all the releases that start with '8.0.' are in an unsupported branch.
-->
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>Drupal</title>
<short_name>drupal</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>8.1.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/drupal</link>
<terms>
<term><name>Projects</name><value>Drupal project</value></term>
</terms>
<releases>
<release>
<name>Drupal 8.1.2</name>
<version>8.1.2</version>
<tag>8.1.2</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-1-2-release</release_link>
<download_link>http://example.com/drupal-8-1-2.tar.gz</download_link>
<date>1250424641</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Security update</value></term>
</terms>
</release>
<release>
<name>Drupal 8.1.1</name>
<version>8.1.1</version>
<tag>8.1.1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-1-1-release</release_link>
<download_link>http://example.com/drupal-8-1-1.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Insecure</value></term>
</terms>
</release>
<release>
<name>Drupal 8.1.0</name>
<version>8.1.0</version>
<tag>8.1.0</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-1-0-release</release_link>
<download_link>http://example.com/drupal-8-1-0.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Insecure</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.2</name>
<version>8.0.2</version>
<tag>8.0.2</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-2-release</release_link>
<download_link>http://example.com/drupal-8-0-2.tar.gz</download_link>
<date>1250424641</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Insecure</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.1</name>
<version>8.0.1</version>
<tag>8.0.1</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-1-release</release_link>
<download_link>http://example.com/drupal-8-0-1.tar.gz</download_link>
<date>1250424581</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Insecure</value></term>
</terms>
</release>
<release>
<name>Drupal 8.0.0</name>
<version>8.0.0</version>
<tag>8.0.0</tag>
<status>published</status>
<release_link>http://example.com/drupal-8-0-0-release</release_link>
<download_link>http://example.com/drupal-8-0-0.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term><name>Release type</name><value>New features</value></term>
<term><name>Release type</name><value>Bug fixes</value></term>
<term><name>Release type</name><value>Insecure</value></term>
</terms>
</release>
</releases>
</project>
......@@ -716,6 +716,83 @@ public function securityUpdateAvailabilityProvider() {
];
}
/**
* Tests messages when a project release is unpublished.
*
* This test confirms that revoked messages are displayed regardless of
* whether the installed version is in a supported branch or not. This test
* relies on 2 test XML fixtures that are identical except for the
* 'supported_branches' value:
* - aaa_update_test.1_0-supported.xml
* 'supported_branches' is '8.x-1.,8.x-2.'.
* - aaa_update_test.1_0-unsupported.xml
* 'supported_branches' is '8.x-2.'.
* They both have an '8.x-1.0' release that is unpublished and an '8.x-2.0'
* release that is published and is the expected update.
*/
public function testRevokedRelease() {
$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();
$this->refreshUpdateStatus([
'drupal' => '0.0',
$this->updateProject => '1_0-supported',
]);
// @todo Change the version label to 'Recommended version:' in
// https://www.drupal.org/node/3114408.
$this->confirmRevokedStatus('8.x-1.0', '8.x-2.0', 'Also available:');
$this->refreshUpdateStatus([
'drupal' => '0.0',
$this->updateProject => '1_0-unsupported',
]);
$this->confirmRevokedStatus('8.x-1.0', '8.x-2.0', 'Recommended version:');
}
/**
* Tests messages when a project release is marked unsupported.
*
* This test confirms unsupported messages are displayed regardless of whether
* the installed version is in a supported branch or not. This test relies on
* 2 test XML fixtures that are identical except for the 'supported_branches'
* value:
* - aaa_update_test.1_0-supported.xml
* 'supported_branches' is '8.x-1.,8.x-2.'.
* - aaa_update_test.1_0-unsupported.xml
* 'supported_branches' is '8.x-2.'.
* They both have an '8.x-1.1' release that has the 'Release type' value of
* 'unsupported' and an '8.x-2.0' release that has the 'Release type' value of
* 'supported' and is the expected update.
*/
public function testUnsupportedRelease() {
$system_info = [
'aaa_update_test' => [
'project' => 'aaa_update_test',
'version' => '8.x-1.1',
'hidden' => FALSE,
],
];
$this->config('update_test.settings')->set('system_info', $system_info)->save();
$this->refreshUpdateStatus([
'drupal' => '0.0',
$this->updateProject => '1_0-supported',
]);
// @todo Change the version label to 'Recommended version:' in
// https://www.drupal.org/node/3114408.
$this->confirmUnsupportedStatus('8.x-1.1', '8.x-2.0', 'Also available:');
$this->refreshUpdateStatus([
'drupal' => '0.0',
$this->updateProject => '1_0-unsupported',
]);
$this->confirmUnsupportedStatus('8.x-1.1', '8.x-2.0', 'Recommended version:');
}
/**
* Asserts that a core compatibility message is correct for an update.
*
......
......@@ -62,6 +62,13 @@ protected function setSystemInfo($version) {
/**
* Tests the Update Manager module when no updates are available.
*
* The XML fixture file 'drupal.1.0.xml' which is one of the XML files this
* test uses also contains 2 extra releases that are newer than '8.0.1'. These
* releases will not show as available updates because of the following
* reasons:
* - '8.0.2' is an unpublished release.
* - '8.0.3' is marked as 'Release type' 'Unsupported'.
*/
public function testNoUpdatesAvailable() {
foreach ([0, 1] as $minor_version) {
......@@ -239,6 +246,11 @@ public function testSecurityUpdateAvailability($site_patch_version, array $expec
* - 8.0.2 Insecure
* - 8.0.1 Insecure
* - 8.0.0 Insecure
* - drupal.sec.1.2_insecure-unsupported
* This file has the exact releases as drupal.sec.1.2_insecure.xml. It has a
* different value for 'supported_branches' that does not contain '8.0.'.
* It is used to ensure that the "Security update required!" is displayed
* even if the currently installed version is in an unsupported branch.
* - drupal.sec.0.2-rc2-b.xml
* - 8.2.0-rc2
* - 8.2.0-rc1
......@@ -313,6 +325,15 @@ public function securityUpdateAvailabilityProvider() {
'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,
'fixture' => 'sec.1.2_insecure',
],
// No security release available for site minor release 0.
// Site minor is not a supported branch.
// Security release available for next minor.
'0.0, 1.2, insecure-unsupported' => [
'site_patch_version' => '0.0',
'expected_security_releases' => ['1.2'],
'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,
'fixture' => 'sec.1.2_insecure-unsupported',
],
// All releases for minor 0 are secure.
// Security release available for next minor.
'0.0, 1.2, secure' => [
......@@ -580,6 +601,52 @@ public function testLocalActions() {
$this->assertUrl('admin/reports/updates/install');
}
/**
* Tests messages when a project release is unpublished.
*
* This test confirms that revoked messages are displayed regardless of
* whether the installed version is in a supported branch or not. This test
* relies on 2 test XML fixtures that are identical except for the
* 'supported_branches' value:
* - drupal.1.0.xml
* 'supported_branches' is '8.0.,8.1.'.
* - drupal.1.0-unsupported.xml
* 'supported_branches' is '8.1.'.
* They both have an '8.0.2' release that is unpublished and an '8.1.0'
* release that is published and is the expected update.
*/
public function testRevokedRelease() {
foreach (['1.0', '1.0-unsupported'] as $fixture) {
$this->setSystemInfo('8.0.2');
$this->refreshUpdateStatus([$this->updateProject => $fixture]);
$this->standardTests();
$this->confirmRevokedStatus('8.0.2', '8.1.0', 'Recommended version:');
}
}
/**
* Tests messages when a project release is marked unsupported.
*
* This test confirms unsupported messages are displayed regardless of whether
* the installed version is in a supported branch or not. This test relies on
* 2 test XML fixtures that are identical except for the 'supported_branches'
* value:
* - drupal.1.0.xml
* 'supported_branches' is '8.0.,8.1.'.
* - drupal.1.0-unsupported.xml
* 'supported_branches' is '8.1.'.
* They both have an '8.0.3' release that that has the 'Release type' value of
* 'unsupported' and an '8.1.0' release that has the 'Release type' value of
* 'supported' and is the expected update.
*/
public function testUnsupportedRelease() {
foreach (['1.0', '1.0-unsupported'] as $fixture) {
$this->setSystemInfo('8.0.3');
$this->refreshUpdateStatus([$this->updateProject => $fixture]);
$this->standardTests();
$this->confirmUnsupportedStatus('8.0.3', '8.1.0', 'Recommended version:');
}
}
/**
* {@inheritdoc}
......
......@@ -204,6 +204,76 @@ protected function assertVersionUpdateLinks($label, $version, $download_version
$this->assertEquals($update_element->findLink('Release notes')->getAttribute('href'), "http://example.com/{$this->updateProject}-$url_version-release");
}
/**
* Confirms messages are correct when a release has been unpublished/revoked.
*
* @param string $revoked_version
* The revoked version that is currently installed.
* @param string $newer_version
* The expected newer version to recommend.
* @param string $new_version_label
* The expected label for the newer version (for example 'Recommended
* version:' or 'Also available:').
*/
protected function confirmRevokedStatus($revoked_version, $newer_version, $new_version_label) {
$this->drupalGet('admin/reports/updates');
$this->clickLink(t('Check manually'));
$this->checkForMetaRefresh();
$this->assertUpdateTableTextContains('Revoked!');
$this->assertUpdateTableTextContains($revoked_version);
$this->assertUpdateTableElementContains('error.svg');
$this->assertUpdateTableTextContains('Release revoked: Your currently installed release has been revoked, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!');
$this->assertVersionUpdateLinks($new_version_label, $newer_version);
}
/**
* Confirms messages are correct when a release has been marked unsupported.
*
* @param string $unsupported_version
* The unsupported version that is currently installed.
* @param string $newer_version
* The expected newer version to recommend.
* @param string $new_version_label
* The expected label for the newer version (for example 'Recommended
* version:' or 'Also available:').
*/
protected function confirmUnsupportedStatus($unsupported_version, $newer_version, $new_version_label) {
$this->drupalGet('admin/reports/updates');
$this->clickLink(t('Check manually'));
$this->checkForMetaRefresh();
$this->assertUpdateTableTextContains('Not supported!');
$this->assertUpdateTableTextContains($unsupported_version);
$this->assertUpdateTableElementContains('error.svg');
$this->assertUpdateTableTextContains('Release not supported: Your currently installed release is now unsupported, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!');
$this->assertVersionUpdateLinks($new_version_label, $newer_version);
}
/**
* Asserts that the update table text contains the specified text.
*