@@ -38,8 +38,7 @@ public static function setUpBeforeClass()
3838 if ('\\' === DIRECTORY_SEPARATOR && null === self ::$ symlinkOnWindows ) {
3939 $ target = tempnam (sys_get_temp_dir (), 'sl ' );
4040 $ 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 )) {
4342 unlink ($ link );
4443 }
4544 unlink ($ target );
@@ -61,6 +60,7 @@ protected function tearDown()
6160 foreach ($ this ->longPathNamesWindows as $ path ) {
6261 exec ('DEL ' .$ path );
6362 }
63+ $ this ->longPathNamesWindows = array ();
6464 }
6565
6666 $ this ->filesystem ->remove ($ this ->workspace );
@@ -350,7 +350,7 @@ public function testRemoveCleansInvalidLinks()
350350
351351 // create symlink to nonexistent dir
352352 rmdir ($ basePath .'dir ' );
353- $ this ->assertFalse (is_dir ($ basePath .'dir-link ' ));
353+ $ this ->assertFalse (@ readlink ($ basePath .'dir-link ' ));
354354
355355 $ this ->filesystem ->remove ($ basePath );
356356
@@ -1089,7 +1089,7 @@ private function markAsSkippedIfChmodIsMissing()
10891089
10901090 private function markAsSkippedIfPosixIsMissing ()
10911091 {
1092- if ('\\' === DIRECTORY_SEPARATOR || !function_exists ('posix_isatty ' )) {
1092+ if (!function_exists ('posix_isatty ' )) {
10931093 $ this ->markTestSkipped ('POSIX is not supported ' );
10941094 }
10951095 }
0 commit comments