function UpdateTestBase::assertVersionUpdateLinks
Same name in other branches
- 8.9.x core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::assertVersionUpdateLinks()
- 10 core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::assertVersionUpdateLinks()
- 11.x core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::assertVersionUpdateLinks()
Asserts that an update version has the correct links.
Parameters
string $label: The label for the update.
string $version: The project version.
5 calls to UpdateTestBase::assertVersionUpdateLinks()
- UpdateContribTest::testNormalUpdateAvailable in core/
modules/ update/ tests/ src/ Functional/ UpdateContribTest.php - Tests the Update Manager module when one normal update is available.
- UpdateContribTest::testUpdateBaseThemeSecurityUpdate in core/
modules/ update/ tests/ src/ Functional/ UpdateContribTest.php - Tests that subthemes are notified about security updates for base themes.
- UpdateSemverTestBase::testNormalUpdateAvailable in core/
modules/ update/ tests/ src/ Functional/ UpdateSemverTestBase.php - Tests the Update Manager module when one normal update is available.
- UpdateTestBase::confirmRevokedStatus in core/
modules/ update/ tests/ src/ Functional/ UpdateTestBase.php - Confirms messages are correct when a release has been unpublished/revoked.
- UpdateTestBase::confirmUnsupportedStatus in core/
modules/ update/ tests/ src/ Functional/ UpdateTestBase.php - Confirms messages are correct when a release has been marked unsupported.
File
-
core/
modules/ update/ tests/ src/ Functional/ UpdateTestBase.php, line 165
Class
- UpdateTestBase
- Defines some shared functions used by all update tests.
Namespace
Drupal\Tests\update\FunctionalCode
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");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.