You are here

protected function DrushTest::prepareEnvironment in Update helper 2.x

Prepares the current environment for running the test.

Also sets up new resources for the testing environment, such as the public filesystem and configuration directories.

This method is private as it must only be called once by BrowserTestBase::setUp() (multiple invocations for the same test would have unpredictable consequences) and it must not be callable or overridable by test classes.

Overrides FunctionalTestSetupTrait::prepareEnvironment

File

tests/src/Functional/DrushTest.php, line 48

Class

DrushTest
Automated tests for Drush commands.

Namespace

Drupal\Tests\update_helper\Functional

Code

protected function prepareEnvironment() {
  parent::prepareEnvironment();
  mkdir($this->siteDirectory . '/modules/test_node_config', 0775, TRUE);
  $info = [
    'name' => 'Node config test module',
    'type' => 'module',
    'core_version_requirement' => '*',
    'package' => 'Testing',
  ];
  file_put_contents($this->siteDirectory . '/modules/test_node_config/test_node_config.info.yml', Yaml::encode($info));
}