public function PrivateKeyTest::testSet in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/PrivateKeyTest.php \Drupal\Tests\Core\PrivateKeyTest::testSet()
- 9 core/tests/Drupal/Tests/Core/PrivateKeyTest.php \Drupal\Tests\Core\PrivateKeyTest::testSet()
Tests PrivateKey::setPrivateKey().
File
- core/
tests/ Drupal/ Tests/ Core/ PrivateKeyTest.php, line 71
Class
- PrivateKeyTest
- Tests the PrivateKey class.
Namespace
Drupal\Tests\CoreCode
public function testSet() {
$random_name = $this
->randomMachineName();
$this->state
->expects($this
->once())
->method('set')
->with('system.private_key', $random_name)
->will($this
->returnValue(TRUE));
$this->privateKey
->set($random_name);
}