function router_test_install
Same name in other branches
- 9 core/modules/system/tests/modules/router_test_directory/router_test.install \router_test_install()
- 10 core/modules/system/tests/modules/router_test_directory/router_test.install \router_test_install()
- 11.x core/modules/system/tests/modules/router_test_directory/router_test.install \router_test_install()
Implements hook_install().
1 string reference to 'router_test_install'
- LazyRouteProviderInstallTest::testInstallation in core/
tests/ Drupal/ FunctionalTests/ Routing/ LazyRouteProviderInstallTest.php - Tests that the lazy route provider is used during a module install.
File
-
core/
modules/ system/ tests/ modules/ router_test_directory/ router_test.install, line 13
Code
function router_test_install() {
// Ensure a URL can be generated for routes provided by the module during
// installation.
\Drupal::state()->set(__FUNCTION__, Url::fromRoute('router_test.1')->toString());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.