function ContentImportAlreadyExistsTest::setUp

Overrides BrowserTestBase::setUp

File

core/tests/Drupal/FunctionalTests/DefaultContent/ContentImportAlreadyExistsTest.php, line 69

Class

ContentImportAlreadyExistsTest
Tests Content Import.

Namespace

Drupal\FunctionalTests\DefaultContent

Code

protected function setUp() : void {
  parent::setUp();
  $this->adminAccount = $this->setUpCurrentUser(admin: TRUE);
  // Apply the recipe that sets up the fields and configuration for our
  // default content.
  $fixtures_dir = $this->getDrupalRoot() . '/core/tests/fixtures';
  $this->applyRecipe($fixtures_dir . '/recipes/default_content_base');
  $this->contentDir = $fixtures_dir . '/default_content';
  \Drupal::service('file_system')->copy($this->contentDir . '/file/druplicon_copy.png', $this->publicFilesDirectory . '/druplicon_copy.png', FileExists::Error);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.