You are here

public function PrivateKeyTest::testGet in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/PrivateKeyTest.php \Drupal\Tests\Core\PrivateKeyTest::testGet()
  2. 10 core/tests/Drupal/Tests/Core/PrivateKeyTest.php \Drupal\Tests\Core\PrivateKeyTest::testGet()

Tests PrivateKey::get().

File

core/tests/Drupal/Tests/Core/PrivateKeyTest.php, line 52

Class

PrivateKeyTest
Tests the PrivateKey class.

Namespace

Drupal\Tests\Core

Code

public function testGet() {
  $this->state
    ->expects($this
    ->once())
    ->method('get')
    ->with('system.private_key')
    ->will($this
    ->returnValue($this->key));
  $this
    ->assertEquals($this->key, $this->privateKey
    ->get());
}