You are here

public function KeyRepositoryAvailableTest::testKeyProviderCanGetKeys in Akamai 8.3

Tests that the key provider retrieves keys from key module.

File

tests/src/Kernel/KeyRepositoryAvailableTest.php, line 60

Class

KeyRepositoryAvailableTest
Tests key provider functionality with key module is installed.

Namespace

Drupal\Tests\akamai\Kernel

Code

public function testKeyProviderCanGetKeys() {
  $keys = $this->container
    ->get('akamai.key_provider')
    ->getKeys();
  $this
    ->assertEquals($keys['my_key']
    ->label(), 'My Key');
  $this
    ->assertEquals($keys['my_key']
    ->getKeyValue(), 'Super secret value');
  $this
    ->assertEquals($keys['second_key']
    ->label(), 'Second Key');
  $this
    ->assertEquals($keys['second_key']
    ->getKeyValue(), 'Yet another key');
}