mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-10 23:56:03 +08:00
29 lines
663 B
PHP
Executable File
29 lines
663 B
PHP
Executable File
<?php
|
|
namespace Repository;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ListProtectedBranchRulesTest extends TestCase {
|
|
public function setUp()
|
|
{
|
|
global $CI;
|
|
$CI->load->model('Repository_model', 'repositoryModel');
|
|
}
|
|
|
|
public function testListProtectedBranchRules()
|
|
{
|
|
global $CI;
|
|
|
|
$rules = $CI->repositoryModel->listProtectedBranchRules('36a80ef66ad60301b9d392628a1caae2');
|
|
$this->assertIsArray($rules);
|
|
}
|
|
|
|
public function testListProtectedBranchRules_Empty()
|
|
{
|
|
global $CI;
|
|
|
|
$rules = $CI->repositoryModel->listProtectedBranchRules('');
|
|
$this->assertFalse($rules);
|
|
}
|
|
}
|