You are here

public function MultipleDistributionsProfileTest::testInstalled in Drupal 10

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

Confirms that the installation succeeded.

File

core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php, line 77

Class

MultipleDistributionsProfileTest
Tests multiple distribution profile support.

Namespace

Drupal\FunctionalTests\Installer

Code

public function testInstalled() {
  $this
    ->assertSession()
    ->addressEquals('user/1');
  $this
    ->assertSession()
    ->statusCodeEquals(200);

  // Confirm that we are logged-in after installation.
  $this
    ->assertSession()
    ->pageTextContains($this->rootUser
    ->getAccountName());

  // Confirm that Drupal recognizes this distribution as the current profile.
  $this
    ->assertEquals('distribution_one', \Drupal::installProfile());
  $this
    ->assertEquals('distribution_one', $this
    ->config('core.extension')
    ->get('profile'), 'The install profile has been written to core.extension configuration.');
  $this
    ->rebuildContainer();
  $this
    ->assertEquals('distribution_one', \Drupal::installProfile());
}