mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Merge branch '2.2' into 2.3
This commit is contained in:
commit
550fc3d321
3 changed files with 25 additions and 4 deletions
|
@ -305,14 +305,16 @@ class GitHubDriverTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @dataProvider invalidUrlProvider
|
||||
* @param string $url
|
||||
* @return void
|
||||
*/
|
||||
public function initializeInvalidReoUrl(): void
|
||||
public function testInitializeInvalidRepoUrl($url): void
|
||||
{
|
||||
$this->expectException('\InvalidArgumentException');
|
||||
|
||||
$repoConfig = array(
|
||||
'url' => 'https://github.com/acme',
|
||||
'url' => $url,
|
||||
);
|
||||
|
||||
$io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
|
||||
|
@ -324,6 +326,18 @@ class GitHubDriverTest extends TestCase
|
|||
$gitHubDriver->initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<array{string}>
|
||||
*/
|
||||
public function invalidUrlProvider()
|
||||
{
|
||||
return array(
|
||||
array('https://github.com/acme'),
|
||||
array('https://github.com/acme/repository/releases'),
|
||||
array('https://github.com/acme/repository/pulls'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider supportsProvider
|
||||
* @param bool $expected
|
||||
|
@ -345,6 +359,8 @@ class GitHubDriverTest extends TestCase
|
|||
array(false, 'https://github.com/acme'),
|
||||
array(true, 'https://github.com/acme/repository'),
|
||||
array(true, 'git@github.com:acme/repository.git'),
|
||||
array(false, 'https://github.com/acme/repository/releases'),
|
||||
array(false, 'https://github.com/acme/repository/pulls'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue