/**
* Asserts that an update version has the correct links.
*
* @param string $label
* The label for the update.
* @param string $version
* The project version.
*/
protected function assertVersionUpdateLinks($label,
$version) { $update_element =
$this->
findUpdateElementByLabel($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->
assertStringNotContainsString("http://example.com/{
$this->updateProject
}-
$version.tar.gz",
$update_element->
getOuterHtml());
$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:').
*/