소스 검색

[Tests] Skip MimeTypeTest if running as root

Joseph Bielawski 13 년 전
부모
커밋
205f524758
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tests/Symfony/Tests/Component/HttpFoundation/File/MimeType/MimeTypeTest.php

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

@@ -94,7 +94,7 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase
         touch($path);
         chmod($path, 0333);
 
-        if (substr(sprintf('%o', fileperms($path)), -4) == '0333') {
+        if (get_current_user() != 'root' && substr(sprintf('%o', fileperms($path)), -4) == '0333') {
             $this->setExpectedException('Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException');
             MimeTypeGuesser::getInstance()->guess($path);
         } else {