From 5ab5310120ba30fce1c4139d017508077603d526 Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Sun, 8 Jan 2023 20:46:21 +0900 Subject: [PATCH] test: Fixed FileTest::testPermission() Co-authored-by: Kenshin Okinaka --- lib/Cake/Test/Case/Utility/FileTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index 7aa3d60de..b095277e4 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -146,7 +146,7 @@ class FileTest extends CakeTestCase { umask(0002); $file = $dir . 'permission_' . uniqid(); - $expecting = decoct(0664 & ~umask()); + $expecting = '0' . decoct(0664 & ~umask()); $File = new File($file, true); $result = $File->perms(); $this->assertEquals($expecting, $result); @@ -154,7 +154,7 @@ class FileTest extends CakeTestCase { umask(0022); $file = $dir . 'permission_' . uniqid(); - $expecting = decoct(0644 & ~umask()); + $expecting = '0' . decoct(0644 & ~umask()); $File = new File($file, true); $result = $File->perms(); $this->assertEquals($expecting, $result); @@ -162,7 +162,7 @@ class FileTest extends CakeTestCase { umask(0422); $file = $dir . 'permission_' . uniqid(); - $expecting = decoct(0244 & ~umask()); + $expecting = '0' . decoct(0244 & ~umask()); $File = new File($file, true); $result = $File->perms(); $this->assertEquals($expecting, $result); @@ -170,7 +170,7 @@ class FileTest extends CakeTestCase { umask(0444); $file = $dir . 'permission_' . uniqid(); - $expecting = decoct(0222 & ~umask()); + $expecting = '0' . decoct(0222 & ~umask()); $File = new File($file, true); $result = $File->perms(); $this->assertEquals($expecting, $result);