function PrivateKeyTest::testGet

Same name in other branches
  1. 9 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()
  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 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());
}

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