mirror of
https://github.com/PGYER/codefever.git
synced 2026-07-01 02:04:35 +08:00
chore(Community Version): move from cloud version
This commit is contained in:
33
tests/model/repository/getObjectsCountTest.php
Executable file
33
tests/model/repository/getObjectsCountTest.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Repository;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class getObjectsCountTest extends TestCase {
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
global $CI;
|
||||
$CI->load->model('Repository_model', 'repositoryModel');
|
||||
}
|
||||
|
||||
public function test_main()
|
||||
{
|
||||
global $CI;
|
||||
|
||||
$uKey = TESTING_USER_KEY;
|
||||
$rKey = TESTING_REPOSITORY_KEY;
|
||||
|
||||
$result = $CI->repositoryModel->getObjectsCount($rKey, $uKey);
|
||||
$this->assertGreaterThanOrEqual(0, $result);
|
||||
}
|
||||
|
||||
public function test_main_empty()
|
||||
{
|
||||
global $CI;
|
||||
|
||||
$result = $CI->repositoryModel->getObjectsCount('', '');
|
||||
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user