Same name and namespace in other branches
- 8.9.x core/modules/system/tests/modules/router_test_directory/router_test.install \router_test_install()
- 9 core/modules/system/tests/modules/router_test_directory/router_test.install \router_test_install()
Implements hook_install().
2 string references to 'router_test_install'
- InstallerRouterTest::testInstalled in core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerRouterTest.php - Confirms that the installation succeeded.
- 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 - Install, update and uninstall functions for the router_test module.
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());
}