function DistributionProfileExistingSettingsTest::testInstalled
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php \Drupal\FunctionalTests\Installer\DistributionProfileExistingSettingsTest::testInstalled()
- 10 core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php \Drupal\FunctionalTests\Installer\DistributionProfileExistingSettingsTest::testInstalled()
- 11.x 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 117
Class
- DistributionProfileExistingSettingsTest
- Tests distribution profile support with existing settings.
Namespace
Drupal\FunctionalTests\InstallerCode
public function testInstalled() {
$this->assertUrl('user/1');
$this->assertSession()
->statusCodeEquals(200);
// Confirm that we are logged-in after installation.
$this->assertText($this->rootUser
->getAccountName());
// Confirm that Drupal recognizes this distribution as the current profile.
$this->assertEqual(\Drupal::installProfile(), 'mydistro');
$this->assertArrayNotHasKey('install_profile', Settings::getAll(), 'The install profile has not been written to settings.php.');
$this->assertEqual($this->config('core.extension')
->get('profile'), 'mydistro', 'The install profile has been written to core.extension configuration.');
$this->rebuildContainer();
$this->assertEqual(\Drupal::installProfile(), 'mydistro');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.