Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / yaml / Tests / ParserTest.php
index 86417ab5689ab4f1dccc21f7ae3857fd17de7bfe..6372fe45eef89f507aad1707efc206d14ff0a043 100644 (file)
@@ -13,9 +13,9 @@ namespace Symfony\Component\Yaml\Tests;
 
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Yaml;
 use Symfony\Component\Yaml\Parser;
 use Symfony\Component\Yaml\Tag\TaggedValue;
+use Symfony\Component\Yaml\Yaml;
 
 class ParserTest extends TestCase
 {
@@ -47,10 +47,10 @@ class ParserTest extends TestCase
                     restore_error_handler();
 
                     if (class_exists('PHPUnit_Util_ErrorHandler')) {
-                        return call_user_func_array('PHPUnit_Util_ErrorHandler::handleError', func_get_args());
+                        return \call_user_func_array('PHPUnit_Util_ErrorHandler::handleError', \func_get_args());
                     }
 
-                    return call_user_func_array('PHPUnit\Util\ErrorHandler::handleError', func_get_args());
+                    return \call_user_func_array('PHPUnit\Util\ErrorHandler::handleError', \func_get_args());
                 }
 
                 $deprecations[] = $msg;
@@ -2095,10 +2095,14 @@ YAML;
      */
     public function testParsingNotReadableFilesThrowsException()
     {
-        if ('\\' === DIRECTORY_SEPARATOR) {
+        if ('\\' === \DIRECTORY_SEPARATOR) {
             $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);