summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/modules/system/src/Tests/Form/ModulesListFormWebTest.php5
-rw-r--r--core/modules/system/tests/modules/system_test/system_test.module14
2 files changed, 18 insertions, 1 deletions
diff --git a/core/modules/system/src/Tests/Form/ModulesListFormWebTest.php b/core/modules/system/src/Tests/Form/ModulesListFormWebTest.php
index 3600364..489f6ff 100644
--- a/core/modules/system/src/Tests/Form/ModulesListFormWebTest.php
+++ b/core/modules/system/src/Tests/Form/ModulesListFormWebTest.php
@@ -19,7 +19,7 @@ class ModulesListFormWebTest extends WebTestBase {
/**
* {@inheritdoc}
*/
- public static $modules = array('system_test');
+ public static $modules = array('system_test', 'help');
/**
* {@inheritdoc}
@@ -46,6 +46,9 @@ class ModulesListFormWebTest extends WebTestBase {
// Check that system_test's permissions link was rendered correctly.
$this->assertFieldByXPath("//a[contains(@href, '/admin/people/permissions#module-system_test') and @title='Configure permissions']");
+
+ // Check that system_test's help link was rendered correctly.
+ $this->assertFieldByXPath("//a[contains(@href, '/admin/help/system_test') and @title='Help']");
}
}
diff --git a/core/modules/system/tests/modules/system_test/system_test.module b/core/modules/system/tests/modules/system_test/system_test.module
index fb1538d..eef3516 100644
--- a/core/modules/system/tests/modules/system_test/system_test.module
+++ b/core/modules/system/tests/modules/system_test/system_test.module
@@ -1,6 +1,20 @@
<?php
use Drupal\Core\Extension\Extension;
+use Drupal\Core\Routing\RouteMatchInterface;
+
+/**
+ * Implements hook_help().
+ */
+function system_test_help($route_name, RouteMatchInterface $route_match) {
+ switch ($route_name) {
+ case 'help.page.system_test':
+ $output = '';
+ $output .= '<h3>' . t('Test Help Page') . '</h3>';
+ $output .= '<p>' . t('This is a test help page for the system_test module for the purpose of testing if the "Help" link displays properly.') . '</p>';
+ return $output;
+ }
+}
/**
* Implements hook_modules_installed().