From 438581dedaff261fe2089f561241e7c03c3cb29a Mon Sep 17 00:00:00 2001 From: Miha Vrhovnik Date: Sat, 8 Oct 2011 14:10:49 +0200 Subject: [PATCH] Skip test if running as superuser as it will fail --- .../Component/HttpFoundation/File/MimeType/MimeTypeTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Symfony/Tests/Component/HttpFoundation/File/MimeType/MimeTypeTest.php b/tests/Symfony/Tests/Component/HttpFoundation/File/MimeType/MimeTypeTest.php index b8810db067..ea83c73c59 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/File/MimeType/MimeTypeTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/File/MimeType/MimeTypeTest.php @@ -79,6 +79,10 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Can not verify chmod operations on Windows'); } + if (in_array(get_current_user(), array('root'))) { + $this->markTestSkipped('This test will fail if run under superuser'); + } + $path = __DIR__.'/../Fixtures/to_delete'; touch($path); chmod($path, 0333);