File tree 1 file changed +9
-2
lines changed
src/Symfony/Component/Filesystem/Tests 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1091,14 +1091,16 @@ public function testReadBrokenLink()
1091
1091
{
1092
1092
$ this ->markAsSkippedIfSymlinkIsMissing ();
1093
1093
1094
- if ('\\' === \DIRECTORY_SEPARATOR ) {
1095
- $ this ->markTestSkipped ('Windows does not support creating "broken" symlinks ' );
1094
+ if ('\\' === \DIRECTORY_SEPARATOR && \ PHP_VERSION_ID < 70400 ) {
1095
+ $ this ->markTestSkipped ('Windows does not support reading "broken" symlinks in PHP < 7.4.0 ' );
1096
1096
}
1097
1097
1098
1098
$ file = $ this ->workspace .'/file ' ;
1099
1099
$ link = $ this ->workspace .'/link ' ;
1100
1100
1101
+ touch ($ file );
1101
1102
$ this ->filesystem ->symlink ($ file , $ link );
1103
+ $ this ->filesystem ->remove ($ file );
1102
1104
1103
1105
$ this ->assertEquals ($ file , $ this ->filesystem ->readlink ($ link ));
1104
1106
$ this ->assertNull ($ this ->filesystem ->readlink ($ link , true ));
@@ -1623,6 +1625,11 @@ public function testDumpFileFollowsSymlink()
1623
1625
$ this ->assertStringEqualsFile ($ linknameA , 'bar ' );
1624
1626
$ this ->assertStringEqualsFile ($ linknameB , 'bar ' );
1625
1627
1628
+ // Windows does not support reading "broken" symlinks in PHP < 7.4.0
1629
+ if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400 ) {
1630
+ return ;
1631
+ }
1632
+
1626
1633
$ this ->filesystem ->remove ($ filename );
1627
1634
$ this ->filesystem ->dumpFile ($ linknameB , 'baz ' );
1628
1635
You can’t perform that action at this time.
0 commit comments