8000 Skip RemotePackageStorage on Windows · symfony/symfony@f578c72 · GitHub
[go: up one dir, main page]

Skip to content

Commit f578c72

Browse files
committed
Skip RemotePackageStorage on Windows
1 parent 6d7fff8 commit f578c72

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ public function testGetStorageDir()
4343

4444
public function testSaveThrowsWhenFailing()
4545
{
46+
if ('\\' === \DIRECTORY_SEPARATOR) {
47+
$this->markTestSkipped('This test cannot run on Windows.');
48+
}
49+
4650
$vendorDir = self::$writableRoot.'/assets/acme/vendor';
4751
$this->filesystem->mkdir($vendorDir.'/module_specifier');
4852
$this->filesystem->touch($vendorDir.'/module_specifier/module_specifier.index.js');
49-
if ('\\' === \DIRECTORY_SEPARATOR) {
50-
$this->filesystem->chmod($vendorDir.'/module_specifier/module_specifier.index.js', 0555);
51-
} else {
52-
$this->filesystem->chmod($vendorDir.'/module_specifier/', 0555);
53-
}
53+
$this->filesystem->chmod($vendorDir.'/module_specifier/', 0555);
5454

5555
$storage = new RemotePackageStorage($vendorDir);
5656
$entry = ImportMapEntry::createRemote('foo', ImportMapType::JS, '/does/not/matter', '1.0.0', 'module_specifier', false);
@@ -61,11 +61,7 @@ public function testSaveThrowsWhenFailing()
6161
try {
6262
$storage->save($entry, 'any content');
6363
} finally {
64-
if ('\\' === \DIRECTORY_SEPARATOR) {
65-
$this->filesystem->chmod($vendorDir.'/module_specifier/module_specifier.index.js', 0777);
66-
} else {
67-
$this->filesystem->chmod($vendorDir.'/module_specifier/', 0777);
68-
}
64+
$this->filesystem->chmod($vendorDir.'/module_specifier/', 0777);
6965
}
7066
}
7167

0 commit comments

Comments
 (0)
0