public function testGetDownloaderForIncorrectlyInstalledPackage()
 {
     $package = $this->createPackageMock();
     $package->expects($this->once())->method('getInstallationSource')->will($this->returnValue(null));
     $manager = new DownloadManager(false, $this->filesystem);
     $this->setExpectedException('InvalidArgumentException');
     $manager->getDownloaderForInstalledPackage($package);
 }
 public function testGetDownloaderForMetapackage()
 {
     $package = $this->createPackageMock();
     $package->expects($this->once())->method('getType')->will($this->returnValue('metapackage'));
     $manager = new DownloadManager($this->io, false, $this->filesystem);
     $this->assertNull($manager->getDownloaderForInstalledPackage($package));
 }