You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #54387 [Filesystem] fix tests on Windows (xabbuh)
This PR was merged into the 7.1 branch.
Discussion
----------
[Filesystem] fix tests on Windows
| Q | A
| ------------- | ---
| Branch? | 7.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
Commits
-------
3dc9c4e fix tests on Windows
Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1812,15 +1812,15 @@ public function testReadFile()
1812
1812
publicfunctiontestReadNonExistentFile()
1813
1813
{
1814
1814
$this->expectException(IOException::class);
1815
-
$this->expectExceptionMessageMatches('#^Failed to read file ".+/Tests/invalid"\\: file_get_contents\\(.+/Tests/invalid\\)\\: Failed to open stream\\: No such file or directory$#');
1815
+
$this->expectExceptionMessageMatches(sprintf('#^Failed to read file ".+%1$sTests/invalid"\\: file_get_contents\\(.+%1$sTests/invalid\\)\\: Failed to open stream\\: No such file or directory$#', preg_quote(\DIRECTORY_SEPARATOR)));
1816
1816
1817
1817
$this->filesystem->readFile(__DIR__.'/invalid');
1818
1818
}
1819
1819
1820
1820
publicfunctiontestReadDirectory()
1821
1821
{
1822
1822
$this->expectException(IOException::class);
1823
-
$this->expectExceptionMessageMatches('#^Failed to read file ".+/Tests"\\: File is a directory\\.$#');
1823
+
$this->expectExceptionMessageMatches(sprintf('#^Failed to read file ".+%sTests"\\: File is a directory\\.$#', preg_quote(\DIRECTORY_SEPARATOR)));
0 commit comments