function HtmxAssetLoadTestSetup::setup
Same name and namespace in other branches
- 11.x core/tests/Drupal/TestSite/HtmxAssetLoadTestSetup.php \Drupal\TestSite\HtmxAssetLoadTestSetup::setup()
Run the code to setup the test environment.
You have access to any API provided by any installed module. For example, to install modules use:
\Drupal::service('module_installer')->install([
'my_module',
]);Check out TestSiteInstallTestScript for an example.
Overrides TestSetupInterface::setup
File
-
core/
tests/ Drupal/ TestSite/ HtmxAssetLoadTestSetup.php, line 17
Class
- HtmxAssetLoadTestSetup
- Setup file used by core/tests/Drupal/Nightwatch/Tests/htmx/htmxTest.js.
Namespace
Drupal\TestSiteCode
public function setup() : void {
// 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.