From 61973ecda60e9f3561e929e19c07d4878b960fc1 Mon Sep 17 00:00:00 2001 From: Laurent Bassin Date: Thu, 20 Sep 2018 16:39:16 +0200 Subject: [PATCH] [Yaml] Skip parser test with root user --- Tests/ParserTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tests/ParserTest.php b/Tests/ParserTest.php index c9aff59f..6372fe45 100644 --- a/Tests/ParserTest.php +++ b/Tests/ParserTest.php @@ -2099,6 +2099,10 @@ public function testParsingNotReadableFilesThrowsException() $this->markTestSkipped('chmod is not supported on Windows'); } + if (!getenv('USER') || 'root' === getenv('USER')) { + $this->markTestSkipped('This test will fail if run under superuser'); + } + $file = __DIR__.'/Fixtures/not_readable.yml'; chmod($file, 0200);