mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-08 06:28:37 +08:00
34 lines
627 B
PHP
Executable File
34 lines
627 B
PHP
Executable File
<?php
|
|
namespace User;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class GetTest extends TestCase {
|
|
public function setUp()
|
|
{
|
|
global $CI;
|
|
$CI->load->model('User_model', 'userModel');
|
|
}
|
|
|
|
public function testGet()
|
|
{
|
|
global $CI;
|
|
|
|
$user = $CI->userModel->get(TESTING_USER_KEY);
|
|
$this->assertIsArray($user);
|
|
|
|
// test store data
|
|
$user = $CI->userModel->get(TESTING_USER_KEY);
|
|
$this->assertIsArray($user);
|
|
}
|
|
|
|
public function testGet_Empty()
|
|
{
|
|
global $CI;
|
|
|
|
$user = $CI->userModel->get('');
|
|
|
|
$this->assertFalse($user);
|
|
}
|
|
}
|