File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/Symfony/Component/Translation/Tests/Writer Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments