function HtmxAssetLoadTestSetup::setup
Overrides TestSetupInterface::setup
File
-
core/
tests/ Drupal/ TestSite/ HtmxAssetLoadTestSetup.php, line 20
Class
- HtmxAssetLoadTestSetup
- Setup file used by tests/src/Nightwatch/Tests/htmxAssetLoadTest.js.
Namespace
Drupal\TestSiteCode
public function setup() : void {
// Install Olivero and set it as the default theme.
$theme_installer = \Drupal::service('theme_installer');
assert($theme_installer instanceof ThemeInstallerInterface);
$theme_installer->install([
'olivero',
], TRUE);
$system_theme_config = \Drupal::configFactory()->getEditable('system.theme');
$system_theme_config->set('default', 'olivero')
->save();
// Install required modules.
$module_installer = \Drupal::service('module_installer');
assert($module_installer instanceof ModuleInstallerInterface);
$module_installer->install([
'test_htmx',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.