Browse Source

Fix typo & tests

Jordi Boggiano 13 years ago
parent
commit
7cb79bb1c9

+ 1 - 1
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;
         }
 

+ 2 - 2
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);
     }
 
     /**

+ 2 - 2
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());
         }
     }