protected function KernelTestBase::setInstallProfile in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setInstallProfile()
- 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setInstallProfile()
Sets the install profile and rebuilds the container to update it.
Parameters
string $profile: The install profile to set.
4 calls to KernelTestBase::setInstallProfile()
- 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.
- SystemListingCrossProfileCompatibleTest::setUp in core/
profiles/ testing/ modules/ drupal_system_listing_compatible_test/ tests/ src/ Kernel/ SystemListingCrossProfileCompatibleTest.php
File
- core/
tests/ Drupal/ KernelTests/ KernelTestBase.php, line 926
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();
}