1
0
Fork 0
forked from mirror/pixelfed
pixelfed/tests/Unit/HttpSignatures/KeyStoreHmacTest.php

17 lines
499 B
PHP
Raw Normal View History

2018-11-19 03:33:40 +00:00
<?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(), ]);
}
}