diff --git a/core/modules/system/src/Tests/Form/ModulesListFormWebTest.php b/core/modules/system/src/Tests/Form/ModulesListFormWebTest.php index 489f6ff..b5b00d2 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', 'help'); + public static $modules = array('system_test', 'help', 'module_test'); /** * {@inheritdoc} diff --git a/core/modules/system/tests/modules/module_test/module_test.info.yml b/core/modules/system/tests/modules/module_test/module_test.info.yml index 5c63da2..072ae1d 100644 --- a/core/modules/system/tests/modules/module_test/module_test.info.yml +++ b/core/modules/system/tests/modules/module_test/module_test.info.yml @@ -4,3 +4,4 @@ description: 'Support module for module system testing.' package: Testing version: VERSION core: 8.x +configure: module_test.configure_link \ No newline at end of file diff --git a/core/modules/system/tests/modules/module_test/module_test.routing.yml b/core/modules/system/tests/modules/module_test/module_test.routing.yml index 06962ce..59e8cb0 100644 --- a/core/modules/system/tests/modules/module_test/module_test.routing.yml +++ b/core/modules/system/tests/modules/module_test/module_test.routing.yml @@ -21,3 +21,13 @@ module_test.class_loading: _controller: '\Drupal\module_test\Controller\ModuleTestController::testClassLoading' requirements: _access: 'TRUE' + +module_test.configure_link: + path: '/module-test/configure-link/{thing}' + defaults: + _title: 'Test how the ModulesListForm::buildRow deals with dynamic routes' + _title_callback: '\Drupal\module_test\Controller\ModuleTestController::testConfigureLinkTitle' + _controller: '\Drupal\module_test\Controller\ModuleTestController::testConfigureLink' + thing: 'success' + requirements: + _access: 'TRUE' diff --git a/core/modules/system/tests/modules/module_test/src/Controller/ModuleTestController.php b/core/modules/system/tests/modules/module_test/src/Controller/ModuleTestController.php index 3a2532e..b9a061d 100644 --- a/core/modules/system/tests/modules/module_test/src/Controller/ModuleTestController.php +++ b/core/modules/system/tests/modules/module_test/src/Controller/ModuleTestController.php @@ -7,6 +7,8 @@ namespace Drupal\module_test\Controller; +use Drupal\Component\Utility\Xss; + /** * Controller routines for module_test routes. */ @@ -33,4 +35,18 @@ public function testClassLoading() { return ['#markup' => module_test_class_loading()]; } + /** + * module_test.configure_link route title callback. + */ + public function testConfigureLinkTitle($thing) { + return Xss::filter($thing); + } + + /** + * module_test.configure_link route controller. + */ + public function testConfigureLink($thing) { + return ['#markup' => $thing]; + } + }