mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Test to check there is a RuntimeException thrown when a path repository doesn't exist
This commit is contained in:
parent
18895064ad
commit
e62478ab89
1 changed files with 18 additions and 0 deletions
|
@ -19,6 +19,24 @@ use Composer\Test\TestCase;
|
||||||
|
|
||||||
class PathRepositoryTest extends TestCase
|
class PathRepositoryTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException RuntimeException
|
||||||
|
*/
|
||||||
|
public function testLoadPackageFromFileSystemWithIncorrectPath()
|
||||||
|
{
|
||||||
|
$ioInterface = $this->getMockBuilder('Composer\IO\IOInterface')
|
||||||
|
->getMock();
|
||||||
|
|
||||||
|
$config = new \Composer\Config();
|
||||||
|
$versionGuesser = null;
|
||||||
|
|
||||||
|
$repositoryUrl = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'Fixtures', 'path', 'missing'));
|
||||||
|
$repository = new PathRepository(array('url' => $repositoryUrl), $ioInterface, $config);
|
||||||
|
$repository->getPackages();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function testLoadPackageFromFileSystemWithVersion()
|
public function testLoadPackageFromFileSystemWithVersion()
|
||||||
{
|
{
|
||||||
$ioInterface = $this->getMockBuilder('Composer\IO\IOInterface')
|
$ioInterface = $this->getMockBuilder('Composer\IO\IOInterface')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue