You are here

public function FixtureTrait::fixtureCreateFile in Mini site 8

Create a single file with content.

Parameters

string $filename: File name of the resulting file.

string $content: (optional) Content of the resulting file.

Return value

string Absolute path to created file.

1 call to FixtureTrait::fixtureCreateFile()
MinisiteTestBase::getTestArchiveInvalidFormat in tests/src/Functional/MinisiteTestBase.php
Shorthand to get an invalid archive file.

File

tests/src/Traits/FixtureTrait.php, line 94

Class

FixtureTrait
Trait FixtureTrait.

Namespace

Drupal\Tests\minisite\Traits

Code

public function fixtureCreateFile($filename, $content = '') {
  $created_files = $this
    ->fixtureCreateFiles([
    $filename => $content,
  ]);
  $created_file = key($created_files);
  return $created_file;
}