function UpdateCoreTest::testMajorUpdateAvailable in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/update/src/Tests/UpdateCoreTest.php \Drupal\update\Tests\UpdateCoreTest::testMajorUpdateAvailable()
Tests the Update Manager module when a major update is available.
File
- core/
modules/ update/ src/ Tests/ UpdateCoreTest.php, line 132 - Contains \Drupal\update\Tests\UpdateCoreTest.
Class
- UpdateCoreTest
- Tests the Update Manager module through a series of functional tests using mock XML data.
Namespace
Drupal\update\TestsCode
function testMajorUpdateAvailable() {
foreach (array(
0,
1,
) as $minor_version) {
foreach (array(
0,
1,
) as $patch_version) {
foreach (array(
'-alpha1',
'-beta1',
'',
) as $extra_version) {
$this
->setSystemInfo("8.{$minor_version}.{$patch_version}" . $extra_version);
$this
->refreshUpdateStatus(array(
'drupal' => '9',
));
$this
->standardTests();
$this
->drupalGet('admin/reports/updates/check');
$this
->assertNoText(t('Security update required!'));
$this
->assertRaw(\Drupal::l('9.0.0', Url::fromUri("http://example.com/drupal-9-0-0-release")), 'Link to release appears.');
$this
->assertRaw(\Drupal::l(t('Download'), Url::fromUri("http://example.com/drupal-9-0-0.tar.gz")), 'Link to download appears.');
$this
->assertRaw(\Drupal::l(t('Release notes'), Url::fromUri("http://example.com/drupal-9-0-0-release")), 'Link to release notes appears.');
$this
->assertNoText(t('Up to date'));
$this
->assertText(t('Not supported!'));
$this
->assertText(t('Recommended version:'));
$this
->assertNoText(t('Latest version:'));
$this
->assertRaw('error.svg', 'Error icon was found.');
}
}
}
}