You are here

public function InstallerRouterTest::testInstalled in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php \Drupal\FunctionalTests\Installer\InstallerRouterTest::testInstalled()

Confirms that the installation succeeded.

File

core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php, line 53

Class

InstallerRouterTest
Tests router rebuilding during installation.

Namespace

Drupal\FunctionalTests\Installer

Code

public function testInstalled() {
  $this
    ->assertSession()
    ->statusCodeEquals(200);

  // Ensures that router is not rebuilt unnecessarily during the install. It
  // is rebuilt during:
  // - router_test_install()
  // - router_installer_test_modules_installed()
  // - install_finished()
  $this
    ->assertSame(3, \Drupal::service('core.performance.test.recorder')
    ->getCount('event', RoutingEvents::FINISHED));
  $this
    ->assertStringEndsWith('/core/install.php/router_installer_test/test1', \Drupal::state()
    ->get('router_installer_test_modules_installed'));
  $this
    ->assertStringEndsWith('/core/install.php/router_test/test1', \Drupal::state()
    ->get('router_test_install'));
}