mirror of
https://github.com/PGYER/codefever.git
synced 2026-06-08 07:02:51 +08:00
chore(Community Version): move from cloud version
This commit is contained in:
30
tests/model/user_sshkey/SearchKeyHashTest.php
Executable file
30
tests/model/user_sshkey/SearchKeyHashTest.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace UserSshkey;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SearchKeyHashTest extends TestCase {
|
||||
public function setUp()
|
||||
{
|
||||
global $CI;
|
||||
$CI->load->model('User_sshkey_model', 'userSshkeyModel');
|
||||
}
|
||||
|
||||
public function testSearchKeyHash()
|
||||
{
|
||||
global $CI;
|
||||
|
||||
$uKey = $CI->userSshkeyModel->searchKeyHash(TESTING_KEY_HASH);
|
||||
|
||||
$this->assertEquals(32, strlen($uKey));
|
||||
}
|
||||
|
||||
public function testSearchKeyHash_Empty()
|
||||
{
|
||||
global $CI;
|
||||
|
||||
$uKey = $CI->userSshkeyModel->searchKeyHash('');
|
||||
|
||||
$this->assertFalse($uKey);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user