mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
test: Fixed FileTest::testPermission()
Co-authored-by: Kenshin Okinaka <okinakak@yahoo.co.jp>
This commit is contained in:
parent
fd5f39df07
commit
5ab5310120
1 changed files with 4 additions and 4 deletions
|
@ -146,7 +146,7 @@ class FileTest extends CakeTestCase {
|
||||||
|
|
||||||
umask(0002);
|
umask(0002);
|
||||||
$file = $dir . 'permission_' . uniqid();
|
$file = $dir . 'permission_' . uniqid();
|
||||||
$expecting = decoct(0664 & ~umask());
|
$expecting = '0' . decoct(0664 & ~umask());
|
||||||
$File = new File($file, true);
|
$File = new File($file, true);
|
||||||
$result = $File->perms();
|
$result = $File->perms();
|
||||||
$this->assertEquals($expecting, $result);
|
$this->assertEquals($expecting, $result);
|
||||||
|
@ -154,7 +154,7 @@ class FileTest extends CakeTestCase {
|
||||||
|
|
||||||
umask(0022);
|
umask(0022);
|
||||||
$file = $dir . 'permission_' . uniqid();
|
$file = $dir . 'permission_' . uniqid();
|
||||||
$expecting = decoct(0644 & ~umask());
|
$expecting = '0' . decoct(0644 & ~umask());
|
||||||
$File = new File($file, true);
|
$File = new File($file, true);
|
||||||
$result = $File->perms();
|
$result = $File->perms();
|
||||||
$this->assertEquals($expecting, $result);
|
$this->assertEquals($expecting, $result);
|
||||||
|
@ -162,7 +162,7 @@ class FileTest extends CakeTestCase {
|
||||||
|
|
||||||
umask(0422);
|
umask(0422);
|
||||||
$file = $dir . 'permission_' . uniqid();
|
$file = $dir . 'permission_' . uniqid();
|
||||||
$expecting = decoct(0244 & ~umask());
|
$expecting = '0' . decoct(0244 & ~umask());
|
||||||
$File = new File($file, true);
|
$File = new File($file, true);
|
||||||
$result = $File->perms();
|
$result = $File->perms();
|
||||||
$this->assertEquals($expecting, $result);
|
$this->assertEquals($expecting, $result);
|
||||||
|
@ -170,7 +170,7 @@ class FileTest extends CakeTestCase {
|
||||||
|
|
||||||
umask(0444);
|
umask(0444);
|
||||||
$file = $dir . 'permission_' . uniqid();
|
$file = $dir . 'permission_' . uniqid();
|
||||||
$expecting = decoct(0222 & ~umask());
|
$expecting = '0' . decoct(0222 & ~umask());
|
||||||
$File = new File($file, true);
|
$File = new File($file, true);
|
||||||
$result = $File->perms();
|
$result = $File->perms();
|
||||||
$this->assertEquals($expecting, $result);
|
$this->assertEquals($expecting, $result);
|
||||||
|
|
Loading…
Reference in a new issue