public function ThunderTestTrait::installDrupal in Thunder 6.2.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::installDrupal()
- 8.2 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::installDrupal()
- 8.3 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::installDrupal()
- 8.4 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::installDrupal()
- 6.0.x tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::installDrupal()
- 6.1.x tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::installDrupal()
File
- tests/
src/ Traits/ ThunderTestTrait.php, line 35
Class
- ThunderTestTrait
- Use this trait to reuse an existing database.
Namespace
Drupal\Tests\thunder\TraitsCode
public function installDrupal() {
$this
->initUserSession();
$this
->prepareSettings();
$this
->doInstall();
$this
->initSettings();
$request = Request::createFromGlobals();
$container = $this
->initKernel($request);
$this
->initConfig($container);
// Add the config directories to settings.php.
$sync_directory = Settings::get('config_sync_directory');
\Drupal::service('file_system')
->prepareDirectory($sync_directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
// Ensure the default temp directory exist and is writable. The configured
// temp directory may be removed during update.
\Drupal::service('file_system')
->prepareDirectory($this->tempFilesDirectory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
$this
->installDefaultThemeFromClassProperty($container);
$this
->installModulesFromClassProperty($container);
$this
->rebuildAll();
$this
->replaceUser1();
}