Skip to content

Commit

Permalink
SplFileInfoRepresentationTest: Set umask for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jnvsor committed Apr 26, 2024
1 parent e3d9818 commit bd7694d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/Zval/Representation/SplFileInfoRepresentationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@
*/
class SplFileInfoRepresentationTest extends KintTestCase
{
protected $umask;
protected $socket;

protected function setUp(): void
{
parent::setUp();

$this->umask = \umask(0);

\ini_set('open_basedir', \realpath(__DIR__.'/../../../').':/dev:/tmp');

\symlink(\dirname(__DIR__), __DIR__.'/testDirLink');
Expand All @@ -61,6 +64,8 @@ protected function tearDown(): void
{
parent::tearDown();

\umask($this->umask);

\unlink(__DIR__.'/testDirLink2');
\unlink(__DIR__.'/testFileLink2');
\unlink(__DIR__.'/testDirLink');
Expand Down Expand Up @@ -300,7 +305,7 @@ public function testConstructPipe()
$this->assertSame($f, $r->path);
$this->assertSame($f, $r->realpath);
$this->assertNull($r->linktarget);
$this->assertSame(\str_split('prwxr-xr-x'), $r->flags);
$this->assertSame(\str_split('prwxrwxrwx'), $r->flags);

if ('fifo' === \filetype($f)) {
$this->assertFalse($r->is_file);
Expand Down Expand Up @@ -331,7 +336,7 @@ public function testConstructSocket()
$this->assertSame($f, $r->path);
$this->assertSame($f, $r->realpath);
$this->assertNull($r->linktarget);
$this->assertSame(\str_split('srwxr-xr-x'), $r->flags);
$this->assertSame(\str_split('srwxrwxrwx'), $r->flags);

if ('socket' === \filetype($f)) {
$this->assertFalse($r->is_file);
Expand Down

0 comments on commit bd7694d

Please sign in to comment.