mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Register github repository type
This commit is contained in:
parent
5efa503e4e
commit
3c5bfcf1e9
2 changed files with 48 additions and 0 deletions
47
tests/Composer/Test/Repository/RepositoryFactoryTest.php
Normal file
47
tests/Composer/Test/Repository/RepositoryFactoryTest.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Test\Repository;
|
||||
|
||||
use Composer\Repository\RepositoryFactory;
|
||||
use Composer\TestCase;
|
||||
|
||||
class RepositoryFactoryTest extends TestCase
|
||||
{
|
||||
public function testManagerWithAllRepositoryTypes()
|
||||
{
|
||||
$manager = RepositoryFactory::manager(
|
||||
$this->getMock('Composer\IO\IOInterface'),
|
||||
$this->getMock('Composer\Config')
|
||||
);
|
||||
|
||||
$ref = new \ReflectionProperty($manager, 'repositoryClasses');
|
||||
$ref->setAccessible(true);
|
||||
$repositoryClasses = $ref->getValue($manager);
|
||||
|
||||
$this->assertEquals([
|
||||
'composer',
|
||||
'vcs',
|
||||
'package',
|
||||
'pear',
|
||||
'git',
|
||||
'github',
|
||||
'gitlab',
|
||||
'svn',
|
||||
'fossil',
|
||||
'perforce',
|
||||
'hg',
|
||||
'artifact',
|
||||
'path',
|
||||
], array_keys($repositoryClasses));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue