8000 fix tests on Windows · symfony/symfony@11d30d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 11d30d1

Browse files
committed
fix tests on Windows
1 parent 4e06f53 commit 11d30d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ public function testUnwritableDirectory()
5555
$writer = new TranslationWriter();
5656
$writer->addDumper('foo', $this->createMock(DumperInterface::class));
5757

58+
$path = tempnam(sys_get_temp_dir(), '');
59+
file_put_contents($path, '');
60+
5861
$this->expectException(RuntimeException::class);
59-
$this->expectExceptionMessage('Translation Writer was not able to create directory "/foo/bar/baz".');
62+
$this->expectExceptionMessage(sprintf('Translation Writer was not able to create directory "%s".', $path));
6063

61-
$writer->write(new MessageCatalogue('en'), 'foo', ['path' => '/foo/bar/baz']);
64+
$writer->write(new MessageCatalogue('en'), 'foo', ['path' => $path]);
6265
}
6366
}

0 commit comments

Comments
 (0)
0