function KernelTestBase::setInstallProfile
Sets the install profile and rebuilds the container to update it.
Parameters
string $profile: The install profile to set.
6 calls to KernelTestBase::setInstallProfile()
- ConfigImporterTest::testInstallProfileMisMatch in core/tests/ Drupal/ KernelTests/ Core/ Config/ ConfigImporterTest.php 
- Tests install profile validation during configuration import.
- FileSystemRequirementsTest::setUp in core/tests/ Drupal/ KernelTests/ Core/ File/ FileSystemRequirementsTest.php 
- ModuleHandlerTest::testProfileAllDependencies in core/modules/ system/ tests/ src/ Kernel/ Extension/ ModuleHandlerTest.php 
- Tests that a profile can supply only real dependencies.
- ModuleHandlerTest::testUninstallProfileDependency in core/modules/ system/ tests/ src/ Kernel/ Extension/ ModuleHandlerTest.php 
- Tests uninstalling a module installed by a profile.
- ModuleInstallerTest::testFieldStorageEntityTypeDependencies in core/tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleInstallerTest.php 
- Tests field storage definitions are installed only if entity types exist.
File
- 
              core/tests/ Drupal/ KernelTests/ KernelTestBase.php, line 977 
Class
- KernelTestBase
- Base class for functional integration tests.
Namespace
Drupal\KernelTestsCode
protected function setInstallProfile($profile) {
  $this->container
    ->get('config.factory')
    ->getEditable('core.extension')
    ->set('profile', $profile)
    ->save();
  // The installation profile is provided by a container parameter. Saving
  // the configuration doesn't automatically trigger invalidation.
  $this->container
    ->get('kernel')
    ->rebuildContainer();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
