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()
55
55
$ writer = new TranslationWriter ();
56
56
$ writer ->addDumper ('foo ' , $ this ->createMock (DumperInterface::class));
57
57
58
+ $ path = tempnam (sys_get_temp_dir (), '' );
59
+ file_put_contents ($ path , '' );
60
+
58
61
$ 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 ) );
60
63
61
- $ writer ->write (new MessageCatalogue ('en ' ), 'foo ' , ['path ' => ' /foo/bar/baz ' ]);
64
+ $ writer ->write (new MessageCatalogue ('en ' ), 'foo ' , ['path ' => $ path ]);
62
65
}
63
66
}
You can’t perform that action at this time.
0 commit comments