function TestSetupInterface::setup
Same name in other branches
- 9 core/tests/Drupal/TestSite/TestSetupInterface.php \Drupal\TestSite\TestSetupInterface::setup()
- 8.9.x core/tests/Drupal/TestSite/TestSetupInterface.php \Drupal\TestSite\TestSetupInterface::setup()
- 11.x 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
4 methods override TestSetupInterface::setup()
- TestSiteClaroInstallTestScript::setup in core/
tests/ Drupal/ TestSite/ TestSiteClaroInstallTestScript.php - Run the code to setup the test environment.
- 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.
- TestSiteOliveroInstallTestScript::setup in core/
tests/ Drupal/ TestSite/ TestSiteOliveroInstallTestScript.php - Run the code to setup the test environment.
File
-
core/
tests/ Drupal/ TestSite/ TestSetupInterface.php, line 27
Class
- TestSetupInterface
- Allows setting up an environment as part of a test site install.
Namespace
Drupal\TestSiteCode
public function setup();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.