X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Ffilesystem%2FTests%2FFilesystemTestCase.php;fp=vendor%2Fsymfony%2Ffilesystem%2FTests%2FFilesystemTestCase.php;h=642925ddee578d5f1c743861c167268b151b5eed;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=cde01e50eb8a543669f858ad12578bf3c85c5fb5;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/symfony/filesystem/Tests/FilesystemTestCase.php b/vendor/symfony/filesystem/Tests/FilesystemTestCase.php index cde01e50e..642925dde 100644 --- a/vendor/symfony/filesystem/Tests/FilesystemTestCase.php +++ b/vendor/symfony/filesystem/Tests/FilesystemTestCase.php @@ -31,24 +31,24 @@ class FilesystemTestCase extends TestCase protected $workspace = null; /** - * @var null|bool Flag for hard links on Windows + * @var bool|null Flag for hard links on Windows */ private static $linkOnWindows = null; /** - * @var null|bool Flag for symbolic links on Windows + * @var bool|null Flag for symbolic links on Windows */ private static $symlinkOnWindows = null; public static function setUpBeforeClass() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { self::$linkOnWindows = true; $originFile = tempnam(sys_get_temp_dir(), 'li'); $targetFile = tempnam(sys_get_temp_dir(), 'li'); if (true !== @link($originFile, $targetFile)) { $report = error_get_last(); - if (is_array($report) && false !== strpos($report['message'], 'error code(1314)')) { + if (\is_array($report) && false !== strpos($report['message'], 'error code(1314)')) { self::$linkOnWindows = false; } } else { @@ -60,7 +60,7 @@ class FilesystemTestCase extends TestCase $targetDir = tempnam(sys_get_temp_dir(), 'sl'); if (true !== @symlink($originDir, $targetDir)) { $report = error_get_last(); - if (is_array($report) && false !== strpos($report['message'], 'error code(1314)')) { + if (\is_array($report) && false !== strpos($report['message'], 'error code(1314)')) { self::$symlinkOnWindows = false; } } else { @@ -129,37 +129,37 @@ class FilesystemTestCase extends TestCase protected function markAsSkippedIfLinkIsMissing() { - if (!function_exists('link')) { + if (!\function_exists('link')) { $this->markTestSkipped('link is not supported'); } - if ('\\' === DIRECTORY_SEPARATOR && false === self::$linkOnWindows) { + if ('\\' === \DIRECTORY_SEPARATOR && false === self::$linkOnWindows) { $this->markTestSkipped('link requires "Create hard links" privilege on windows'); } } protected function markAsSkippedIfSymlinkIsMissing($relative = false) { - if ('\\' === DIRECTORY_SEPARATOR && false === self::$symlinkOnWindows) { + if ('\\' === \DIRECTORY_SEPARATOR && false === self::$symlinkOnWindows) { $this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows'); } // https://bugs.php.net/bug.php?id=69473 - if ($relative && '\\' === DIRECTORY_SEPARATOR && 1 === PHP_ZTS) { + if ($relative && '\\' === \DIRECTORY_SEPARATOR && 1 === PHP_ZTS) { $this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions'); } } protected function markAsSkippedIfChmodIsMissing() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('chmod is not supported on Windows'); } } protected function markAsSkippedIfPosixIsMissing() { - if (!function_exists('posix_isatty')) { + if (!\function_exists('posix_isatty')) { $this->markTestSkipped('Function posix_isatty is required.'); } }