public function UpdateUploadTest::testUpdateManagerCoreSecurityUpdateMessages in Drupal 8
Same name and namespace in other branches
- 9 core/modules/update/tests/src/Functional/UpdateUploadTest.php \Drupal\Tests\update\Functional\UpdateUploadTest::testUpdateManagerCoreSecurityUpdateMessages()
Checks the messages on update manager pages when missing a security update.
File
- core/
modules/ update/ tests/ src/ Functional/ UpdateUploadTest.php, line 158
Class
- UpdateUploadTest
- Tests the Update Manager module's upload and extraction functionality.
Namespace
Drupal\Tests\update\FunctionalCode
public function testUpdateManagerCoreSecurityUpdateMessages() {
$setting = [
'#all' => [
'version' => '8.0.0',
],
];
$this
->config('update_test.settings')
->set('system_info', $setting)
->set('xml_map', [
'drupal' => '0.2-sec',
])
->save();
$this
->config('update.settings')
->set('fetch.url', Url::fromRoute('update_test.update_test')
->setAbsolute()
->toString())
->save();
// Initialize the update status.
$this
->drupalGet('admin/reports/updates');
// Now, make sure none of the Update manager pages have duplicate messages
// about core missing a security update.
$this
->drupalGet('admin/modules/install');
$this
->assertNoText(t('There is a security update available for your version of Drupal.'));
$this
->drupalGet('admin/modules/update');
$this
->assertNoText(t('There is a security update available for your version of Drupal.'));
$this
->drupalGet('admin/appearance/install');
$this
->assertNoText(t('There is a security update available for your version of Drupal.'));
$this
->drupalGet('admin/appearance/update');
$this
->assertNoText(t('There is a security update available for your version of Drupal.'));
$this
->drupalGet('admin/reports/updates/install');
$this
->assertNoText(t('There is a security update available for your version of Drupal.'));
$this
->drupalGet('admin/reports/updates/update');
$this
->assertNoText(t('There is a security update available for your version of Drupal.'));
$this
->drupalGet('admin/update/ready');
$this
->assertNoText(t('There is a security update available for your version of Drupal.'));
}