소스 검색

[HttpFoundation] fixed test cleanup

Kris Wallsmith 14 년 전
부모
커밋
ef43b22546
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      tests/Symfony/Tests/Component/HttpFoundation/File/MimeType/MimeTypeTest.php

+ 6 - 5
tests/Symfony/Tests/Component/HttpFoundation/File/MimeType/MimeTypeTest.php

@@ -65,13 +65,14 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase
 
         $this->setExpectedException('Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException');
         MimeTypeGuesser::getInstance()->guess($path);
-
-
     }
+
     public static function tearDownAfterClass()
     {
         $path = __DIR__.'/../Fixtures/to_delete';
-        chmod($path, 0666);
-        @unlink($path);
+        if (file_exists($path)) {
+            chmod($path, 0666);
+            @unlink($path);
+        }
     }
-}
+}