You are here

public function MinisiteTestBase::getTestArchiveInvalidFormat in Mini site 8

Shorthand to get an invalid archive file.

Return value

\Drupal\file\Entity\File The File entity object.

1 call to MinisiteTestBase::getTestArchiveInvalidFormat()
FieldValidationTest::testValidateArchiveFormat in tests/src/Functional/FieldValidationTest.php
Tests the archive format on minisite field.

File

tests/src/Functional/MinisiteTestBase.php, line 322

Class

MinisiteTestBase
Provides methods specifically for testing Minisite module's field handling.

Namespace

Drupal\Tests\minisite\Functional

Code

public function getTestArchiveInvalidFormat() {
  $filename = $this
    ->fixtureCreateFile('invalid.zip', rand(1, 9));
  return $this
    ->convertToFileEntity($filename);
}