mirror of
https://github.com/danog/file.git
synced 2024-11-30 04:19:39 +01:00
Account for umask in file permission assertion
This commit is contained in:
parent
5e1651468b
commit
75d2a77951
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/composer.lock
|
/composer.lock
|
||||||
/vendor
|
/vendor
|
||||||
/.php_cs.cache
|
/.php_cs.cache
|
||||||
|
/build
|
@ -233,9 +233,9 @@ abstract class DriverTest extends TestCase {
|
|||||||
// test for 0, because previous array_filter made that not work
|
// test for 0, because previous array_filter made that not work
|
||||||
$dir = "{$fixtureDir}/newdir/with/recursive/creation/0/1/2";
|
$dir = "{$fixtureDir}/newdir/with/recursive/creation/0/1/2";
|
||||||
|
|
||||||
yield File\mkdir($dir, 0764, true); // the umask is 022 by default
|
yield File\mkdir($dir, 0764, true);
|
||||||
$stat = yield File\stat($dir);
|
$stat = yield File\stat($dir);
|
||||||
$this->assertSame(0764, $stat["mode"] & 0777);
|
$this->assertSame(0764 & (~\umask()), $stat["mode"] & 0777);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user