mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Adds support for gitlab install in subfolder
Since gitlab can be hosted on any url also subdirectories should be supported. (e.g https://mycompany.com/gitlab). This supports only http and https protocols since the gitlab api url is derived from the package repository url. And the ssh protocol doesn't support folders this way.
This commit is contained in:
parent
fbab2bfa17
commit
b471440ea0
2 changed files with 11 additions and 1 deletions
|
@ -217,4 +217,14 @@ JSON;
|
|||
array('http://example.com/foo/bar', false),
|
||||
);
|
||||
}
|
||||
|
||||
public function testGitlabSubDirectory()
|
||||
{
|
||||
$url = 'https://mycompany.com/gitlab/mygroup/myproject';
|
||||
$apiUrl = 'https://mycompany.com/gitlab/api/v3/projects/mygroup%2Fmyproject';
|
||||
|
||||
$driver = new GitLabDriver(array('url' => $url), $this->io->reveal(), $this->config, $this->process->reveal(), $this->remoteFilesystem->reveal());
|
||||
$driver->initialize();
|
||||
$this->assertEquals($apiUrl, $driver->getApiUrl(), 'API URL is derived from the repository URL');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue