You are here

public function TestSiteMultilingualInstallTestScript::setup in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php \Drupal\TestSite\TestSiteMultilingualInstallTestScript::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

See also

\Drupal\TestSite\TestSiteInstallTestScript

File

core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php, line 24

Class

TestSiteMultilingualInstallTestScript
Setup file used by TestSiteApplicationTest.

Namespace

Drupal\TestSite

Code

public function setup() {
  \Drupal::service('module_installer')
    ->install([
    'test_page_test',
  ]);
}