|
@@ -131,7 +131,8 @@ class LibraryInstallerTest extends TestCase
|
|
|
*/
|
|
|
public function testUpdate()
|
|
|
{
|
|
|
- $library = new LibraryInstaller($this->io, $this->composer);
|
|
|
+ $filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
|
|
+ $library = new LibraryInstaller($this->io, $this->composer, 'library', $filesystem);
|
|
|
$initial = $this->createPackageMock();
|
|
|
$target = $this->createPackageMock();
|
|
|
|
|
@@ -140,6 +141,11 @@ class LibraryInstallerTest extends TestCase
|
|
|
->method('getPrettyName')
|
|
|
->will($this->returnValue('package1'));
|
|
|
|
|
|
+ $target
|
|
|
+ ->expects($this->once())
|
|
|
+ ->method('getPrettyName')
|
|
|
+ ->will($this->returnValue('package1'));
|
|
|
+
|
|
|
$this->repository
|
|
|
->expects($this->exactly(3))
|
|
|
->method('hasPackage')
|