mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Merge branch 'master' into 2.0
This commit is contained in:
commit
bc002ae1fb
31 changed files with 485 additions and 56 deletions
|
@ -48,4 +48,24 @@ class RepositoryFactoryTest extends TestCase
|
|||
'path',
|
||||
), array_keys($repositoryClasses));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider generateRepositoryNameProvider
|
||||
*/
|
||||
public function testGenerateRepositoryName($index, array $config, array $existingRepos, $expected)
|
||||
{
|
||||
$this->assertSame($expected, RepositoryFactory::generateRepositoryName($index, $config, $existingRepos));
|
||||
}
|
||||
|
||||
public function generateRepositoryNameProvider()
|
||||
{
|
||||
return array(
|
||||
array(0, array(), array(), 0),
|
||||
array(0, array(), array(array()), '02'),
|
||||
array(0, array('url' => 'https://example.org'), array(), 'example.org'),
|
||||
array(0, array('url' => 'https://example.org'), array('example.org' => array()), 'example.org2'),
|
||||
array('example.org', array('url' => 'https://example.org/repository'), array(), 'example.org'),
|
||||
array('example.org', array('url' => 'https://example.org/repository'), array('example.org' => array()), 'example.org2'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue