Fix typo & tests
parent
605e1cb925
commit
7cb79bb1c9
src/Composer/Downloader
tests/Composer/Test/Downloader
|
@ -59,7 +59,7 @@ abstract class ArchiveDownloader extends FileDownloader
|
|||
}
|
||||
} catch (\Exception $e) {
|
||||
// clean up
|
||||
$this->fs->removeDirectory($path);
|
||||
$this->filesystem->removeDirectory($path);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class FileDownloader implements DownloaderInterface
|
|||
}
|
||||
} catch (\Exception $e) {
|
||||
// clean up
|
||||
$this->fs->removeDirectory($path);
|
||||
$this->filesystem->removeDirectory($path);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ class FileDownloader implements DownloaderInterface
|
|||
*/
|
||||
public function remove(PackageInterface $package, $path)
|
||||
{
|
||||
$this->fs->removeDirectory($path);
|
||||
$this->filesystem->removeDirectory($path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,7 +39,7 @@ class FileDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
$downloader->download($packageMock, '/path');
|
||||
}
|
||||
|
||||
public function testDownloadToExistFile()
|
||||
public function testDownloadToExistingFile()
|
||||
{
|
||||
$packageMock = $this->getMock('Composer\Package\PackageInterface');
|
||||
$packageMock->expects($this->once())
|
||||
|
@ -57,7 +57,7 @@ class FileDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
if (file_exists($path)) {
|
||||
unset($path);
|
||||
}
|
||||
$this->assertInstanceOf('UnexpectedValueException', $e);
|
||||
$this->assertInstanceOf('RuntimeException', $e);
|
||||
$this->assertContains('exists and is not a directory', $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue