Skip to content
Snippets Groups Projects
Commit 3474fb9c authored by Theresa Grannum's avatar Theresa Grannum Committed by Adam G-H
Browse files

Issue #3313630 by Theresa.Grannum, phenaproxima: Automatic Updates help has...

Issue #3313630 by Theresa.Grannum, phenaproxima: Automatic Updates help has the wrong route name and errors
parent dee92696
No related branches found
No related tags found
No related merge requests found
...@@ -10,13 +10,14 @@ use Drupal\Core\Routing\RouteMatchInterface; ...@@ -10,13 +10,14 @@ use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\automatic_updates\Validation\AdminReadinessMessages; use Drupal\automatic_updates\Validation\AdminReadinessMessages;
use Drupal\Core\Url; use Drupal\Core\Url;
use Drupal\system\Controller\DbUpdateController; use Drupal\system\Controller\DbUpdateController;
use Drupal\package_manager\Validator\ComposerExecutableValidator;
/** /**
* Implements hook_help(). * Implements hook_help().
*/ */
function automatic_updates_help($route_name, RouteMatchInterface $route_match) { function automatic_updates_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) { switch ($route_name) {
case 'help.page.auto_updates': case 'help.page.automatic_updates':
$output = '<h3>' . t('About') . '</h3>'; $output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Automatic Updates lets you update Drupal core.') . '</p>'; $output .= '<p>' . t('Automatic Updates lets you update Drupal core.') . '</p>';
$output .= '<p>'; $output .= '<p>';
......
<?php
namespace Drupal\Tests\automatic_updates\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* @group automatic_updates
*/
class HelpPageTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'automatic_updates',
'help',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests that the help page for Automatic Updates loads correctly.
*/
public function testHelpPage(): void {
$user = $this->createUser([
'access administration pages',
]);
$this->drupalLogin($user);
$this->drupalGet('/admin/help/automatic_updates');
$assert_session = $this->assertSession();
$assert_session->statusCodeEquals(200);
$assert_session->pageTextContains('Automatic Updates');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment