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'); }
/** * @dataProvider dataForTestSupports */ public function testSupports($url, $expected) { $this->assertSame($expected, GitLabDriver::supports($this->io->reveal(), $this->config, $url)); }