File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
tests/system/Cache/Handlers
user_guide_src/source/libraries Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ protected function setUp(): void
2626 {
2727 parent ::setUp ();
2828
29+ if (! function_exists ('octal_permissions ' ))
30+ {
31+ helper ('filesystem ' );
32+ }
33+
2934 // Initialize path
3035 $ this ->config = new \Config \Cache ();
3136 $ this ->config ->file ['storePath ' ] .= self ::$ directory ;
@@ -188,18 +193,18 @@ public function testSaveMode($int, $string)
188193 $ this ->fileHandler ->save (self ::$ key1 , 'value ' );
189194
190195 $ file = $ config ->file ['storePath ' ] . DIRECTORY_SEPARATOR . self ::$ key1 ;
191- $ mode = substr ( sprintf ( ' %o ' , fileperms ($ file )), - 4 );
196+ $ mode = octal_permissions ( fileperms ($ file ));
192197
193198 $ this ->assertEquals ($ string , $ mode );
194199 }
195200
196201 public function modeProvider ()
197202 {
198203 return [
199- [0640 , '0640 ' ],
200- [0600 , '0600 ' ],
201- [0660 , '0660 ' ],
202- [0777 , '0777 ' ],
204+ [0640 , '640 ' ],
205+ [0600 , '600 ' ],
206+ [0660 , '660 ' ],
207+ [0777 , '777 ' ],
203208 ];
204209 }
205210
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ here that is prepended to all key names.
6161
6262**$file **
6363
64- This is an array of settings specific to the ``File `` handler determine how it should save the cache files.
64+ This is an array of settings specific to the ``File `` handler to determine how it should save the cache files.
6565
6666**$memcached **
6767
You can’t perform that action at this time.
0 commit comments