diff --git a/src/Composer/Downloader/ArchiveDownloader.php b/src/Composer/Downloader/ArchiveDownloader.php index c275689c1..f5c777bf3 100644 --- a/src/Composer/Downloader/ArchiveDownloader.php +++ b/src/Composer/Downloader/ArchiveDownloader.php @@ -59,7 +59,7 @@ abstract class ArchiveDownloader extends FileDownloader } } catch (\Exception $e) { // clean up - $this->fs->removeDirectory($path); + $this->filesystem->removeDirectory($path); throw $e; } diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Downloader/FileDownloader.php index bcf21c153..beadc8f4c 100644 --- a/src/Composer/Downloader/FileDownloader.php +++ b/src/Composer/Downloader/FileDownloader.php @@ -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); } /** diff --git a/tests/Composer/Test/Downloader/FileDownloaderTest.php b/tests/Composer/Test/Downloader/FileDownloaderTest.php index a93deaac5..9b898e68c 100644 --- a/tests/Composer/Test/Downloader/FileDownloaderTest.php +++ b/tests/Composer/Test/Downloader/FileDownloaderTest.php @@ -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()); } }