mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-23 23:11:27 +00:00
17 lines
499 B
PHP
17 lines
499 B
PHP
|
<?php
|
||
|
|
||
|
namespace Tests\Unit\HttpSignatures;
|
||
|
|
||
|
use App\Util\HttpSignatures\KeyStore;
|
||
|
|
||
|
class KeyStoreHmacTest extends \PHPUnit\Framework\TestCase
|
||
|
{
|
||
|
public function testFetchHmacSuccess()
|
||
|
{
|
||
|
$ks = new KeyStore(['hmacsecret' => 'ThisIsASecretKey']);
|
||
|
$key = $ks->fetch('hmacsecret');
|
||
|
$this->assertEquals(['hmacsecret', 'ThisIsASecretKey', 'ThisIsASecretKey', 'secret'], [
|
||
|
$key->getId(), $key->getVerifyingKey(), $key->getSigningKey(), $key->getType(), ]);
|
||
|
}
|
||
|
}
|