From 7cb79bb1c9dda1f9c4dd219747baf170f67d574d Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 26 Mar 2012 01:56:24 +0200 Subject: [PATCH] Fix typo & tests --- src/Composer/Downloader/ArchiveDownloader.php | 2 +- src/Composer/Downloader/FileDownloader.php | 4 ++-- tests/Composer/Test/Downloader/FileDownloaderTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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()); } }