HmacSha1Test.php 506 Bytes
Newer Older
1 2
<?php

3
namespace yiiunit\extensions\authclient\signature;
4

5
use yii\authclient\signature\HmacSha1;
6 7 8 9
use yiiunit\extensions\authclient\TestCase;

class HmacSha1Test extends TestCase
{
10 11 12
    public function testGenerateSignature()
    {
        $signatureMethod = new HmacSha1();
13

14 15
        $baseString = 'test_base_string';
        $key = 'test_key';
16

17 18 19
        $signature = $signatureMethod->generateSignature($baseString, $key);
        $this->assertNotEmpty($signature, 'Unable to generate signature!');
    }
AlexGx committed
20
}