Update v1.0.6.5
This commit is contained in:
@@ -17,6 +17,8 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $umask;
|
||||
|
||||
static protected $longPathNamesWindows = array();
|
||||
|
||||
/**
|
||||
* @var \Symfony\Component\Filesystem\Filesystem
|
||||
*/
|
||||
@@ -31,6 +33,12 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
if (!empty(self::$longPathNamesWindows)) {
|
||||
foreach (self::$longPathNamesWindows as $path) {
|
||||
exec('DEL '.$path);
|
||||
}
|
||||
}
|
||||
|
||||
if ('\\' === DIRECTORY_SEPARATOR && null === self::$symlinkOnWindows) {
|
||||
$target = tempnam(sys_get_temp_dir(), 'sl');
|
||||
$link = sys_get_temp_dir().'/sl'.microtime(true).mt_rand();
|
||||
@@ -92,7 +100,7 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
|
||||
$this->markTestSkipped('Unable to retrieve file group name');
|
||||
}
|
||||
|
||||
protected function markAsSkippedIfSymlinkIsMissing()
|
||||
protected function markAsSkippedIfSymlinkIsMissing($relative = false)
|
||||
{
|
||||
if (!function_exists('symlink')) {
|
||||
$this->markTestSkipped('Function symlink is required.');
|
||||
@@ -101,6 +109,11 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
|
||||
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) {
|
||||
$this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions');
|
||||
}
|
||||
}
|
||||
|
||||
protected function markAsSkippedIfChmodIsMissing()
|
||||
|
Reference in New Issue
Block a user