Browse Source

Fix tests

Jordi Boggiano 13 years ago
parent
commit
ef300ca56a

+ 1 - 1
src/Composer/Repository/InstalledRepositoryInterface.php

@@ -21,6 +21,6 @@ use Composer\Package\PackageInterface;
  *
  * @author Jordi Boggiano <j.boggiano@seld.be>
  */
-interface InstalledRepositoryInterface
+interface InstalledRepositoryInterface extends WritableRepositoryInterface
 {
 }

+ 5 - 5
tests/Composer/Test/Installer/Fixtures/installer-v1/Installer/Custom.php

@@ -4,16 +4,16 @@ namespace Installer;
 
 use Composer\Installer\InstallerInterface;
 use Composer\Package\PackageInterface;
-use Composer\Repository\WritableRepositoryInterface;
+use Composer\Repository\InstalledRepositoryInterface;
 
 class Custom implements InstallerInterface
 {
     public $version = 'installer-v1';
 
     public function supports($packageType) {}
-    public function isInstalled(WritableRepositoryInterface $repo, PackageInterface $package) {}
-    public function install(WritableRepositoryInterface $repo, PackageInterface $package) {}
-    public function update(WritableRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
-    public function uninstall(WritableRepositoryInterface $repo, PackageInterface $package) {}
+    public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) {}
+    public function install(InstalledRepositoryInterface $repo, PackageInterface $package) {}
+    public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
+    public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) {}
     public function getInstallPath(PackageInterface $package) {}
 }

+ 5 - 5
tests/Composer/Test/Installer/Fixtures/installer-v2/Installer/Custom2.php

@@ -4,16 +4,16 @@ namespace Installer;
 
 use Composer\Installer\InstallerInterface;
 use Composer\Package\PackageInterface;
-use Composer\Repository\WritableRepositoryInterface;
+use Composer\Repository\InstalledRepositoryInterface;
 
 class Custom2 implements InstallerInterface
 {
     public $version = 'installer-v2';
 
     public function supports($packageType) {}
-    public function isInstalled(WritableRepositoryInterface $repo, PackageInterface $package) {}
-    public function install(WritableRepositoryInterface $repo, PackageInterface $package) {}
-    public function update(WritableRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
-    public function uninstall(WritableRepositoryInterface $repo, PackageInterface $package) {}
+    public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) {}
+    public function install(InstalledRepositoryInterface $repo, PackageInterface $package) {}
+    public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
+    public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) {}
     public function getInstallPath(PackageInterface $package) {}
 }

+ 5 - 5
tests/Composer/Test/Installer/Fixtures/installer-v3/Installer/Custom2.php

@@ -4,16 +4,16 @@ namespace Installer;
 
 use Composer\Installer\InstallerInterface;
 use Composer\Package\PackageInterface;
-use Composer\Repository\WritableRepositoryInterface;
+use Composer\Repository\InstalledRepositoryInterface;
 
 class Custom2 implements InstallerInterface
 {
     public $version = 'installer-v3';
 
     public function supports($packageType) {}
-    public function isInstalled(WritableRepositoryInterface $repo, PackageInterface $package) {}
-    public function install(WritableRepositoryInterface $repo, PackageInterface $package) {}
-    public function update(WritableRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
-    public function uninstall(WritableRepositoryInterface $repo, PackageInterface $package) {}
+    public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) {}
+    public function install(InstalledRepositoryInterface $repo, PackageInterface $package) {}
+    public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
+    public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) {}
     public function getInstallPath(PackageInterface $package) {}
 }

+ 1 - 1
tests/Composer/Test/Installer/InstallationManagerTest.php

@@ -21,7 +21,7 @@ class InstallationManagerTest extends \PHPUnit_Framework_TestCase
 {
     public function setUp()
     {
-        $this->repository = $this->getMock('Composer\Repository\WritableRepositoryInterface');
+        $this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
     }
 
     public function testVendorDirOutsideTheWorkingDir()

+ 1 - 1
tests/Composer/Test/Installer/InstallerInstallerTest.php

@@ -34,7 +34,7 @@ class InstallerInstallerTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->repository = $this->getMock('Composer\Repository\WritableRepositoryInterface');
+        $this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
 
         $this->io = $this->getMock('Composer\IO\IOInterface');
     }

+ 1 - 1
tests/Composer/Test/Installer/LibraryInstallerTest.php

@@ -40,7 +40,7 @@ class LibraryInstallerTest extends TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->repository = $this->getMock('Composer\Repository\WritableRepositoryInterface');
+        $this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
 
         $this->io = $this->getMock('Composer\IO\IOInterface');
     }

+ 1 - 1
tests/Composer/Test/Installer/MetapackageInstallerTest.php

@@ -22,7 +22,7 @@ class MetapackageInstallerTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->repository = $this->getMock('Composer\Repository\WritableRepositoryInterface');
+        $this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
 
         $this->io = $this->getMock('Composer\IO\IOInterface');