function router_test_install

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/router_test_directory/router_test.install \router_test_install()
  2. 8.9.x core/modules/system/tests/modules/router_test_directory/router_test.install \router_test_install()
  3. 10 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

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.