public function UpdateUploadTest::testUpdateManagerCoreSecurityUpdateMessages in Drupal 9
Same name and namespace in other branches
- 8 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 163
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
->assertSession()
->pageTextNotContains('There is a security update available for your version of Drupal.');
$this
->drupalGet('admin/modules/update');
$this
->assertSession()
->pageTextNotContains('There is a security update available for your version of Drupal.');
$this
->drupalGet('admin/appearance/install');
$this
->assertSession()
->pageTextNotContains('There is a security update available for your version of Drupal.');
$this
->drupalGet('admin/appearance/update');
$this
->assertSession()
->pageTextNotContains('There is a security update available for your version of Drupal.');
$this
->drupalGet('admin/reports/updates/install');
$this
->assertSession()
->pageTextNotContains('There is a security update available for your version of Drupal.');
$this
->drupalGet('admin/reports/updates/update');
$this
->assertSession()
->pageTextNotContains('There is a security update available for your version of Drupal.');
$this
->drupalGet('admin/update/ready');
$this
->assertSession()
->pageTextNotContains('There is a security update available for your version of Drupal.');
}