protected function KeyRepositoryAvailableTest::generateKeys in Akamai 8.3
Helper function to dummy key entities.
1 call to KeyRepositoryAvailableTest::generateKeys()
- KeyRepositoryAvailableTest::setUp in tests/
src/ Kernel/ KeyRepositoryAvailableTest.php
File
- tests/
src/ Kernel/ KeyRepositoryAvailableTest.php, line 33
Class
- KeyRepositoryAvailableTest
- Tests key provider functionality with key module is installed.
Namespace
Drupal\Tests\akamai\KernelCode
protected function generateKeys() {
$this->container
->get('entity_type.manager')
->getStorage('key')
->create([
'id' => 'my_key',
'label' => 'My Key',
'key_provider_settings' => [
'key_value' => 'Super secret value',
],
])
->save();
$this->container
->get('entity_type.manager')
->getStorage('key')
->create([
'id' => 'second_key',
'label' => 'Second Key',
'key_provider_settings' => [
'key_value' => 'Yet another key',
],
])
->save();
}