public function TestSetupInterface::setup in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/TestSite/TestSetupInterface.php \Drupal\TestSite\TestSetupInterface::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.
See also
\Drupal\TestSite\TestSiteInstallTestScript
2 methods override TestSetupInterface::setup()
- TestSiteInstallTestScript::setup in core/
tests/ Drupal/ TestSite/ TestSiteInstallTestScript.php - Run the code to setup the test environment.
- TestSiteMultilingualInstallTestScript::setup in core/
tests/ Drupal/ TestSite/ TestSiteMultilingualInstallTestScript.php - Run the code to setup the test environment.
File
- core/
tests/ Drupal/ TestSite/ TestSetupInterface.php, line 25
Class
- TestSetupInterface
- Allows setting up an environment as part of a test site install.
Namespace
Drupal\TestSiteCode
public function setup();