mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-10 23:56:03 +08:00
27 lines
621 B
PHP
Executable File
27 lines
621 B
PHP
Executable File
<?php
|
|
namespace Repository;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class normalizeBranchesTest extends TestCase {
|
|
protected $CI;
|
|
public function setUp()
|
|
{
|
|
global $CI;
|
|
$this->CI = $CI;
|
|
$this->CI->load->model('Repository_model', 'repositoryModel');
|
|
}
|
|
|
|
public function test_main()
|
|
{
|
|
global $CI;
|
|
$testData = ['branch1', 'branch2'];
|
|
|
|
$testData = $CI->repositoryModel->normalizeBranches($testData);
|
|
|
|
foreach ($testData as $branch) {
|
|
$this->assertIsString($branch['id']);
|
|
$this->assertIsString($branch['name']);
|
|
}
|
|
}
|
|
} |