You are here

public function DistributionProfileExistingSettingsTest::testInstalled in Drupal 9

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

Confirms that the installation succeeded.

File

core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php, line 116

Class

DistributionProfileExistingSettingsTest
Tests distribution profile support with existing settings.

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('my_distro', \Drupal::installProfile());
  $this
    ->assertEquals('my_distro', $this
    ->config('core.extension')
    ->get('profile'), 'The install profile has been written to core.extension configuration.');
  $this
    ->rebuildContainer();
  $this
    ->assertEquals('my_distro', \Drupal::installProfile());
}