1
0
Fork 0

Fix tests

pull/61/head
Jordi Boggiano 2011-10-23 19:55:43 +02:00
parent d7b77b9e87
commit 5e52d5c1ad
2 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class FilesystemRepository extends ArrayRepository implements WritableRepository
} }
if (is_array($packages)) { if (is_array($packages)) {
$loader = new ArrayLoader(); $loader = new ArrayLoader($this->repositoryManager);
foreach ($packages as $package) { foreach ($packages as $package) {
$this->addPackage($loader->load($package)); $this->addPackage($loader->load($package));
} }

View File

@ -22,6 +22,7 @@ class FilesystemRepositoryTest extends \PHPUnit_Framework_TestCase
$json = $this->createJsonFileMock(); $json = $this->createJsonFileMock();
$repository = new FilesystemRepository($json); $repository = new FilesystemRepository($json);
$repository->setRepositoryManager($this->getMock('Composer\Repository\RepositoryManager'));
$json $json
->expects($this->once()) ->expects($this->once())
@ -47,6 +48,7 @@ class FilesystemRepositoryTest extends \PHPUnit_Framework_TestCase
$json = $this->createJsonFileMock(); $json = $this->createJsonFileMock();
$repository = new FilesystemRepository($json); $repository = new FilesystemRepository($json);
$repository->setRepositoryManager($this->getMock('Composer\Repository\RepositoryManager'));
$json $json
->expects($this->once()) ->expects($this->once())