protected function AuthenticationBasicAuthTest::createKey in Entity Share 8.3
Create a key of Basic auth type.
1 call to AuthenticationBasicAuthTest::createKey()
- AuthenticationBasicAuthTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationBasicAuthTest.php
File
- modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationBasicAuthTest.php, line 160
Class
- AuthenticationBasicAuthTest
- Functional test class for import with "Basic Auth" authorization.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function createKey() {
$this
->createTestKey(static::$keyName, 'entity_share_basic_auth', 'config');
$username = $this->channelUser
->getAccountName();
$password = $this->channelUser->passRaw;
$key_value = <<<EOT
{
"username": "{<span class="php-variable">$username</span>}",
"password": "{<span class="php-variable">$password</span>}"
}
EOT;
$this->testKey
->setKeyValue($key_value);
$this->testKey
->save();
}