|
|
|
@ -65,6 +65,21 @@ class FilesystemRepositoryTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
$repository->getPackages();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testUnexistentRepositoryFile()
|
|
|
|
|
{
|
|
|
|
|
$json = $this->createJsonFileMock();
|
|
|
|
|
|
|
|
|
|
$repository = new FilesystemRepository($json);
|
|
|
|
|
$repository->setRepositoryManager($this->getMock('Composer\Repository\RepositoryManager'));
|
|
|
|
|
|
|
|
|
|
$json
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
->method('exists')
|
|
|
|
|
->will($this->returnValue(false));
|
|
|
|
|
|
|
|
|
|
$this->assertEquals(array(), $repository->getPackages());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testRepositoryWrite()
|
|
|
|
|
{
|
|
|
|
|
$json = $this->createJsonFileMock();
|
|
|
|
|