From 5e52d5c1adde80cb511f91bf9c2c22a7e1335ff2 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 23 Oct 2011 19:55:43 +0200 Subject: [PATCH] Fix tests --- src/Composer/Repository/FilesystemRepository.php | 2 +- tests/Composer/Test/Repository/FilesystemRepositoryTest.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Composer/Repository/FilesystemRepository.php b/src/Composer/Repository/FilesystemRepository.php index 5a5534df7..ba392652c 100644 --- a/src/Composer/Repository/FilesystemRepository.php +++ b/src/Composer/Repository/FilesystemRepository.php @@ -49,7 +49,7 @@ class FilesystemRepository extends ArrayRepository implements WritableRepository } if (is_array($packages)) { - $loader = new ArrayLoader(); + $loader = new ArrayLoader($this->repositoryManager); foreach ($packages as $package) { $this->addPackage($loader->load($package)); } diff --git a/tests/Composer/Test/Repository/FilesystemRepositoryTest.php b/tests/Composer/Test/Repository/FilesystemRepositoryTest.php index e0df7fe5d..8cdd58831 100644 --- a/tests/Composer/Test/Repository/FilesystemRepositoryTest.php +++ b/tests/Composer/Test/Repository/FilesystemRepositoryTest.php @@ -22,6 +22,7 @@ class FilesystemRepositoryTest extends \PHPUnit_Framework_TestCase $json = $this->createJsonFileMock(); $repository = new FilesystemRepository($json); + $repository->setRepositoryManager($this->getMock('Composer\Repository\RepositoryManager')); $json ->expects($this->once()) @@ -47,6 +48,7 @@ class FilesystemRepositoryTest extends \PHPUnit_Framework_TestCase $json = $this->createJsonFileMock(); $repository = new FilesystemRepository($json); + $repository->setRepositoryManager($this->getMock('Composer\Repository\RepositoryManager')); $json ->expects($this->once())