Skip to content

Commit 1e547be

Browse files
[Filesystem] enforce umask while testing
1 parent ba51a0b commit 1e547be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
class FilesystemTest extends \PHPUnit_Framework_TestCase
2020
{
21+
private $umask;
22+
2123
/**
2224
* @var string
2325
*/
@@ -47,6 +49,7 @@ public static function setUpBeforeClass()
4749

4850
public function setUp()
4951
{
52+
$this->umask = umask(0);
5053
$this->filesystem = new Filesystem();
5154
$this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().rand(0, 1000);
5255
mkdir($this->workspace, 0777, true);
@@ -56,6 +59,7 @@ public function setUp()
5659
public function tearDown()
5760
{
5861
$this->clean($this->workspace);
62+
umask($this->umask);
5963
}
6064

6165
/**

0 commit comments

Comments
 (0)