function PrivateKeyTest::testGet

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/PrivateKeyTest.php \Drupal\Tests\Core\PrivateKeyTest::testGet()
  2. 8.9.x core/tests/Drupal/Tests/Core/PrivateKeyTest.php \Drupal\Tests\Core\PrivateKeyTest::testGet()
  3. 11.x core/tests/Drupal/Tests/Core/PrivateKeyTest.php \Drupal\Tests\Core\PrivateKeyTest::testGet()

Tests PrivateKey::get().

File

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

Class

PrivateKeyTest
Tests the PrivateKey class.

Namespace

Drupal\Tests\Core

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.