Added "Github Enterprise" build type. Issue #163.

This commit is contained in:
Dmitry Khomutov 2018-03-19 22:32:30 +07:00
commit c61602189a
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
9 changed files with 90 additions and 159 deletions

View file

@ -39,7 +39,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
public function testExecute_TestGithubDefaultBranch()
{
$project = new Project();
$project->setType('github');
$project->setType(Project::TYPE_GITHUB);
self::assertEquals('master', $project->getBranch());
}
@ -47,7 +47,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
public function testExecute_TestGitlabDefaultBranch()
{
$project = new Project();
$project->setType('gitlab');
$project->setType(Project::TYPE_GITLAB);
self::assertEquals('master', $project->getBranch());
}
@ -55,7 +55,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
public function testExecute_TestBitbucketDefaultBranch()
{
$project = new Project();
$project->setType('bitbucket');
$project->setType(Project::TYPE_BITBUCKET);
self::assertEquals('master', $project->getBranch());
}
@ -63,7 +63,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
public function testExecute_TestMercurialDefaultBranch()
{
$project = new Project();
$project->setType('hg');
$project->setType(Project::TYPE_HG);
self::assertEquals('default', $project->getBranch());
}

View file

@ -67,8 +67,13 @@ class ProjectServiceTest extends \PHPUnit\Framework\TestCase
*/
public function testExecute_CreateGitlabProjectWithoutPort()
{
$reference = 'git@gitlab.block8.net:block8/phpci.git';
$returnValue = $this->testedService->createProject('Gitlab', 'gitlab', $reference, 0);
$reference = 'git@gitlab.block8.net:block8/phpci.git';
$returnValue = $this->testedService->createProject(
'Gitlab',
Project::TYPE_GITLAB,
$reference,
0
);
self::assertEquals('git', $returnValue->getAccessInformation('user'));
self::assertEquals('gitlab.block8.net', $returnValue->getAccessInformation('domain'));