BasicTest.php in JSON Web Token Authentication (JWT) 8.0
File
tests/src/Kernel/BasicTest.php
View source
<?php
namespace Drupal\Tests\jwt\Kernel;
use Drupal\KernelTests\KernelTestBase;
class BasicTest extends KernelTestBase {
public static $modules = [
'system',
'key',
'jwt',
'jwt_test',
];
public function setUp() {
parent::setUp();
$this
->installConfig([
'key',
'jwt',
'jwt_test',
]);
}
public function testConfig() {
$key_repository = $this->container
->get('key.repository');
$key_hmac = $key_repository
->getKey('jwt_test_hmac');
$this
->assertNotEmpty($key_hmac);
$key_rsa = $key_repository
->getKey('jwt_test_rsa');
$this
->assertNotEmpty($key_rsa);
}
}