You are here

public function EncryptionServiceTest::setUp in Encryption 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/EncryptionServiceTest.php \Drupal\Tests\encryption\Kernel\EncryptionServiceTest::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/EncryptionServiceTest.php, line 24

Class

EncryptionServiceTest
@group encryption

Namespace

Drupal\Tests\encryption\Kernel

Code

public function setUp() {
  parent::setUp();

  // Get the settigns object.
  $settings = Settings::getAll();

  // Add a randomly generated encryption key.
  new Settings($settings + [
    'encryption_key' => base64_encode(random_bytes(32)),
  ]);
}