@@ -38,8 +38,7 @@ public static function setUpBeforeClass()
38
38
if ('\\' === DIRECTORY_SEPARATOR && null === self ::$ symlinkOnWindows ) {
39
39
$ target = tempnam (sys_get_temp_dir (), 'sl ' );
40
40
$ link = sys_get_temp_dir ().'/sl ' .microtime (true ).mt_rand ();
41
- if (@symlink ($ target , $ link )) {
42
- self ::$ symlinkOnWindows = @is_link ($ link );
41
+ if (self ::$ symlinkOnWindows = @symlink ($ target , $ link )) {
43
42
unlink ($ link );
44
43
}
45
44
unlink ($ target );
@@ -61,6 +60,7 @@ protected function tearDown()
61
60
foreach ($ this ->longPathNamesWindows as $ path ) {
62
61
exec ('DEL ' .$ path );
63
62
}
63
+ $ this ->longPathNamesWindows = array ();
64
64
}
65
65
66
66
$ this ->filesystem ->remove ($ this ->workspace );
@@ -350,7 +350,7 @@ public function testRemoveCleansInvalidLinks()
350
350
351
351
// create symlink to nonexistent dir
352
352
rmdir ($ basePath .'dir ' );
353
- $ this ->assertFalse (is_dir ($ basePath .'dir-link ' ));
353
+ $ this ->assertFalse (@ readlink ($ basePath .'dir-link ' ));
354
354
355
355
$ this ->filesystem ->remove ($ basePath );
356
356
@@ -1089,7 +1089,7 @@ private function markAsSkippedIfChmodIsMissing()
1089
1089
1090
1090
private function markAsSkippedIfPosixIsMissing ()
1091
1091
{
1092
- if ('\\' === DIRECTORY_SEPARATOR || !function_exists ('posix_isatty ' )) {
1092
+ if (!function_exists ('posix_isatty ' )) {
1093
1093
$ this ->markTestSkipped ('POSIX is not supported ' );
1094
1094
}
1095
1095
}
0 commit comments