You are here

protected function MTimeProtectedFileStorageBase::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php \Drupal\Tests\Component\PhpStorage\MTimeProtectedFileStorageBase::setUp()
  2. 9 core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php \Drupal\Tests\Component\PhpStorage\MTimeProtectedFileStorageBase::setUp()

Overrides PhpStorageTestBase::setUp

File

core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php, line 40

Class

MTimeProtectedFileStorageBase
Base test class for MTime protected storage.

Namespace

Drupal\Tests\Component\PhpStorage

Code

protected function setUp() : void {
  parent::setUp();

  // Random generator.
  $random = new Random();
  $this->secret = $random
    ->name(8, TRUE);
  $this->settings = [
    'directory' => $this->directory,
    'bin' => 'test',
    'secret' => $this->secret,
  ];
}