diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php index d740425..18fd23b 100644 --- a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php +++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php @@ -511,6 +511,38 @@ public function testLocalActions() { } /** + * Ensures that the "Check manually" links work properly on other admin pages. + */ + public function testCheckManuallyLinks() { + $admin_user = $this->drupalCreateUser([ + 'administer site configuration', + 'administer modules', + 'administer software updates', + 'view update notifications', + ]); + $this->drupalLogin($admin_user); + + // We need to place the system status messages block since it's the links in + // there that we're trying to test. + $this->drupalPlaceBlock('system_messages_block'); + + $this->setProjectInstalledVersion('8.0.0'); + + // Instead of using refreshUpdateStatus(), set these manually. + $this->config('update.settings') + ->set('fetch.url', Url::fromRoute('update_test.update_test')->setAbsolute()->toString()) + ->save(); + $this->config('update_test.settings') + ->set('xml_map', ['drupal' => '0.1']) + ->save(); + + // Now we can fetch the 'Extend' page and should see the warning we care about. + $this->drupalGet('admin/modules'); + $this->clickLink('check manually'); + $this->assertSession()->statusCodeEquals(200); + } + + /** * Checks that Drupal recovers after problems connecting to update server. */ public function testBrokenThenFixedUpdates() {