You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					20 lines
				
				466 B
			
		
		
			
		
	
	
					20 lines
				
				466 B
			| 
											12 years ago
										 | <?php
 | ||
|  | 
 | ||
| 
											12 years ago
										 | namespace yiiunit\extensions\authclient\signature;
 | ||
| 
											12 years ago
										 | 
 | ||
| 
											12 years ago
										 | use yii\authclient\signature\HmacSha1;
 | ||
| 
											12 years ago
										 | use yiiunit\extensions\authclient\TestCase;
 | ||
|  | 
 | ||
|  | class HmacSha1Test extends TestCase
 | ||
|  | {
 | ||
|  | 	public function testGenerateSignature()
 | ||
|  | 	{
 | ||
|  | 		$signatureMethod = new HmacSha1();
 | ||
|  | 
 | ||
|  | 		$baseString = 'test_base_string';
 | ||
|  | 		$key = 'test_key';
 | ||
|  | 
 | ||
|  | 		$signature = $signatureMethod->generateSignature($baseString, $key);
 | ||
|  | 		$this->assertNotEmpty($signature, 'Unable to generate signature!');
 | ||
|  | 	}
 | ||
|  | }
 |