Skip to content

Commit

Permalink
skip one assertEquals for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
a1812 committed Apr 20, 2021
1 parent a288240 commit 2ca8c35
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
Expand Up @@ -1032,7 +1032,21 @@ public function testReadAbsoluteLink()
$this->filesystem->symlink($link1, $link2);

$this->assertEquals($file, $this->filesystem->readlink($link1));
$this->assertEquals(('\\' === \DIRECTORY_SEPARATOR ? $file : $link1), $this->filesystem->readlink($link2));

if ('\\' !== \DIRECTORY_SEPARATOR) {
/*
this in Windows
PHP 7.1 - 7.2
$this->filesystem->readlink($link2) // ***\dir\link
PHP 7.3 - 8.0
$this->filesystem->readlink($link2) // ***\file
therefore skipped for Windows
*/
$this->assertEquals($link1, $this->filesystem->readlink($link2));
}

$this->assertEquals($file, $this->filesystem->readlink($link1, true));
$this->assertEquals($file, $this->filesystem->readlink($link2, true));
$this->assertEquals($file, $this->filesystem->readlink($file, true));
Expand Down

0 comments on commit 2ca8c35

Please sign in to comment.