@@ -64,7 +64,7 @@ public function testCopyUnreadableFileFails()
6464 file_put_contents ($ sourceFilePath , 'SOURCE FILE ' );
6565
6666 // make sure target cannot be read
67- $ this ->filesystem ->chmod ($ sourceFilePath , 0222 );
67+ $ this ->filesystem ->chmod ($ sourceFilePath , 0o222 );
6868
6969 $ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath );
7070 }
@@ -146,7 +146,7 @@ public function testCopyWithOverrideWithReadOnlyTargetFails()
146146 touch ($ targetFilePath , $ modificationTime );
147147
148148 // make sure target is read-only
149- $ this ->filesystem ->chmod ($ targetFilePath , 0444 );
149+ $ this ->filesystem ->chmod ($ targetFilePath , 0o444 );
150150
151151 $ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath , true );
152152 }
@@ -359,7 +359,7 @@ public function testRemoveThrowsExceptionOnPermissionDenied()
359359 mkdir ($ basePath );
360360 $ file = $ basePath .\DIRECTORY_SEPARATOR .'file ' ;
361361 touch ($ file );
362- chmod ($ basePath , 0400 );
362+ chmod ($ basePath , 0o400 );
363363
364364 try {
365365 $ this ->filesystem ->remove ($ file );
@@ -369,7 +369,7 @@ public function testRemoveThrowsExceptionOnPermissionDenied()
369369 $ this ->assertStringContainsString ('Permission denied ' , $ e ->getMessage ());
370370 } finally {
371371 // Make sure we can clean up this file
372- chmod ($ basePath , 0777 );
372+ chmod ($ basePath , 0o777 );
373373 }
374374 }
375375
@@ -476,8 +476,8 @@ public function testChmodChangesFileMode()
476476 $ file = $ dir .\DIRECTORY_SEPARATOR .'file ' ;
477477 touch ($ file );
478478
479- $ this ->filesystem ->chmod ($ file , 0400 );
480- $ this ->filesystem ->chmod ($ dir , 0753 );
479+ $ this ->filesystem ->chmod ($ file , 0o400 );
480+ $ this ->filesystem ->chmod ($ dir , 0o753 );
481481
482482 $ this ->assertFilePermissions (753 , $ dir );
483483 $ this ->assertFilePermissions (400 , $ file );
@@ -492,8 +492,8 @@ public function testChmodRecursive()
492492 $ file = $ dir .\DIRECTORY_SEPARATOR .'file ' ;
493493 touch ($ file );
494494
495- $ this ->filesystem ->chmod ($ file , 0400 , 0000 , true );
496- $ this ->filesystem ->chmod ($ dir , 0753 , 0000 , true );
495+ $ this ->filesystem ->chmod ($ file , 0o400 , 0o000 , true );
496+ $ this ->filesystem ->chmod ($ dir , 0o753 , 0o000 , true );
497497
498498 $ this ->assertFilePermissions (753 , $ dir );
499499 $ this ->assertFilePermissions (753 , $ file );
@@ -506,7 +506,7 @@ public function testChmodAppliesUmask()
506506 $ file = $ this ->workspace .\DIRECTORY_SEPARATOR .'file ' ;
507507 touch ($ file );
508508
509- $ this ->filesystem ->chmod ($ file , 0770 , 0022 );
509+ $ this ->filesystem ->chmod ($ file , 0o770 , 0o022 );
510510 $ this ->assertFilePermissions (750 , $ file );
511511 }
512512
@@ -521,7 +521,7 @@ public function testChmodChangesModeOfArrayOfFiles()
521521 mkdir ($ directory );
522522 touch ($ file );
523523
524- $ this ->filesystem ->chmod ($ files , 0753 );
524+ $ this ->filesystem ->chmod ($ files , 0o753 );
525525
526526 $ this ->assertFilePermissions (753 , $ file );
527527 $ this ->assertFilePermissions (753 , $ directory );
@@ -538,7 +538,7 @@ public function testChmodChangesModeOfTraversableFileObject()
538538 mkdir ($ directory );
539539 touch ($ file );
540540
541- $ this ->filesystem ->chmod ($ files , 0753 );
541+ $ this ->filesystem ->chmod ($ files , 0o753 );
542542
543543 $ this ->assertFilePermissions (753 , $ file );
544544 $ this ->assertFilePermissions (753 , $ directory );
@@ -553,9 +553,9 @@ public function testChmodChangesZeroModeOnSubdirectoriesOnRecursive()
553553
554554 mkdir ($ directory );
555555 mkdir ($ subdirectory );
556- chmod ($ subdirectory , 0000 );
556+ chmod ($ subdirectory , 0o000 );
557557
558- $ this ->filesystem ->chmod ($ directory , 0753 , 0000 , true );
558+ $ this ->filesystem ->chmod ($ directory , 0o753 , 0o000 , true );
559559
560560 $ this ->assertFilePermissions (753 , $ subdirectory );
561561 }
@@ -1294,7 +1294,7 @@ public function testMirrorCopiesLinkedDirectoryContents()
12941294
12951295 $ sourcePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'source ' .\DIRECTORY_SEPARATOR ;
12961296
1297- mkdir ($ sourcePath .'nested/ ' , 0777 , true );
1297+ mkdir ($ sourcePath .'nested/ ' , 0o777 , true );
12981298 file_put_contents ($ sourcePath .'/nested/file1.txt ' , 'FILE1 ' );
12991299 // Note: We symlink directory, not file
13001300 symlink ($ sourcePath .'nested ' , $ sourcePath .'link1 ' );
@@ -1315,7 +1315,7 @@ public function testMirrorCopiesRelativeLinkedContents()
13151315 $ sourcePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'source ' .\DIRECTORY_SEPARATOR ;
13161316 $ oldPath = getcwd ();
13171317
1318- mkdir ($ sourcePath .'nested/ ' , 0777 , true );
1318+ mkdir ($ sourcePath .'nested/ ' , 0o777 , true );
13191319 file_put_contents ($ sourcePath .'/nested/file1.txt ' , 'FILE1 ' );
13201320 // Note: Create relative symlink
13211321 chdir ($ sourcePath );
@@ -1565,7 +1565,7 @@ public function testDumpFile()
15651565
15661566 // skip mode check on Windows
15671567 if ('\\' !== \DIRECTORY_SEPARATOR ) {
1568- $ oldMask = umask (0002 );
1568+ $ oldMask = umask (0o002 );
15691569 }
15701570
15711571 $ this ->filesystem ->dumpFile ($ filename , 'bar ' );
@@ -1661,7 +1661,7 @@ public function testAppendToFile()
16611661
16621662 // skip mode check on Windows
16631663 if ('\\' !== \DIRECTORY_SEPARATOR ) {
1664- $ oldMask = umask (0002 );
1664+ $ oldMask = umask (0o002 );
16651665 }
16661666
16671667 $ this ->filesystem ->dumpFile ($ filename , 'foo ' );
@@ -1684,7 +1684,7 @@ public function testAppendToFileWithResource()
16841684
16851685 // skip mode check on Windows
16861686 if ('\\' !== \DIRECTORY_SEPARATOR ) {
1687- $ oldMask = umask (0002 );
1687+ $ oldMask = umask (0o002 );
16881688 }
16891689
16901690 $ this ->filesystem ->dumpFile ($ filename , 'foo ' );
@@ -1767,7 +1767,7 @@ public function testAppendToFileCreateTheFileIfNotExists()
17671767
17681768 // skip mode check on Windows
17691769 if ('\\' !== \DIRECTORY_SEPARATOR ) {
1770- $ oldMask = umask (0002 );
1770+ $ oldMask = umask (0o002 );
17711771 }
17721772
17731773 $ this ->filesystem ->appendToFile ($ filename , 'bar ' );
@@ -1800,7 +1800,7 @@ public function testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile()
18001800
18011801 $ filename = $ this ->workspace .\DIRECTORY_SEPARATOR .'foo.txt ' ;
18021802 file_put_contents ($ filename , 'FOO BAR ' );
1803- chmod ($ filename , 0745 );
1803+ chmod ($ filename , 0o745 );
18041804
18051805 $ this ->filesystem ->dumpFile ($ filename , 'bar ' );
18061806
@@ -1811,13 +1811,13 @@ public function testDumpFileCleansUpAfterFailure()
18111811 {
18121812 $ targetFile = $ this ->workspace .'/dump-file ' ;
18131813 $ this ->filesystem ->touch ($ targetFile );
1814- $ this ->filesystem ->chmod ($ targetFile , 0444 );
1814+ $ this ->filesystem ->chmod ($ targetFile , 0o444 );
18151815
18161816 try {
18171817 $ this ->filesystem ->dumpFile ($ targetFile , 'any content ' );
18181818 } catch (IOException $ e ) {
18191819 } finally {
1820- $ this ->filesystem ->chmod ($ targetFile , 0666 );
1820+ $ this ->filesystem ->chmod ($ targetFile , 0o666 );
18211821 }
18221822
18231823 $ this ->assertSame ([$ targetFile ], glob ($ this ->workspace .'/* ' ));
@@ -1868,7 +1868,7 @@ public function testCopyShouldKeepExecutionPermission()
18681868 $ targetFilePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'copy_target_file ' ;
18691869
18701870 file_put_contents ($ sourceFilePath , 'SOURCE FILE ' );
1871- chmod ($ sourceFilePath , 0745 );
1871+ chmod ($ sourceFilePath , 0o745 );
18721872
18731873 $ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath );
18741874
0 commit comments