@@ -64,7 +64,7 @@ public function testCopyUnreadableFileFails()
64
64
file_put_contents ($ sourceFilePath , 'SOURCE FILE ' );
65
65
66
66
// make sure target cannot be read
67
- $ this ->filesystem ->chmod ($ sourceFilePath , 0222 );
67
+ $ this ->filesystem ->chmod ($ sourceFilePath , 0o222 );
68
68
69
69
$ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath );
70
70
}
@@ -146,7 +146,7 @@ public function testCopyWithOverrideWithReadOnlyTargetFails()
146
146
touch ($ targetFilePath , $ modificationTime );
147
147
148
148
// make sure target is read-only
149
- $ this ->filesystem ->chmod ($ targetFilePath , 0444 );
149
+ $ this ->filesystem ->chmod ($ targetFilePath , 0o444 );
150
150
151
151
$ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath , true );
152
152
}
@@ -359,7 +359,7 @@ public function testRemoveThrowsExceptionOnPermissionDenied()
359
359
mkdir ($ basePath );
360
360
$ file = $ basePath .\DIRECTORY_SEPARATOR .'file ' ;
361
361
touch ($ file );
362
- chmod ($ basePath , 0400 );
362
+ chmod ($ basePath , 0o400 );
363
363
364
364
try {
365
365
$ this ->filesystem ->remove ($ file );
@@ -369,7 +369,7 @@ public function testRemoveThrowsExceptionOnPermissionDenied()
369
369
$ this ->assertStringContainsString ('Permission denied ' , $ e ->getMessage ());
370
370
} finally {
371
371
// Make sure we can clean up this file
372
- chmod ($ basePath , 0777 );
372
+ chmod ($ basePath , 0o777 );
373
373
}
374
374
}
375
375
@@ -476,8 +476,8 @@ public function testChmodChangesFileMode()
476
476
$ file = $ dir .\DIRECTORY_SEPARATOR .'file ' ;
477
477
touch ($ file );
478
478
479
- $ this ->filesystem ->chmod ($ file , 0400 );
480
- $ this ->filesystem ->chmod ($ dir , 0753 );
479
+ $ this ->filesystem ->chmod ($ file , 0o400 );
480
+ $ this ->filesystem ->chmod ($ dir , 0o753 );
481
481
482
482
$ this ->assertFilePermissions (753 , $ dir );
483
483
$ this ->assertFilePermissions (400 , $ file );
@@ -492,8 +492,8 @@ public function testChmodRecursive()
492
492
$ file = $ dir .\DIRECTORY_SEPARATOR .'file ' ;
493
493
touch ($ file );
494
494
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 );
497
497
498
498
$ this ->assertFilePermissions (753 , $ dir );
499
499
$ this ->assertFilePermissions (753 , $ file );
@@ -506,7 +506,7 @@ public function testChmodAppliesUmask()
506
506
$ file = $ this ->workspace .\DIRECTORY_SEPARATOR .'file ' ;
507
507
touch ($ file );
508
508
509
- $ this ->filesystem ->chmod ($ file , 0770 , 0022 );
509
+ $ this ->filesystem ->chmod ($ file , 0o770 , 0o022 );
510
510
$ this ->assertFilePermissions (750 , $ file );
511
511
}
512
512
@@ -521,7 +521,7 @@ public function testChmodChangesModeOfArrayOfFiles()
521
521
mkdir ($ directory );
522
522
touch ($ file );
523
523
524
- $ this ->filesystem ->chmod ($ files , 0753 );
524
+ $ this ->filesystem ->chmod ($ files , 0o753 );
525
525
526
526
$ this ->assertFilePermissions (753 , $ file );
527
527
$ this ->assertFilePermissions (753 , $ directory );
@@ -538,7 +538,7 @@ public function testChmodChangesModeOfTraversableFileObject()
538
538
mkdir ($ directory );
539
539
touch ($ file );
540
540
541
- $ this ->filesystem ->chmod ($ files , 0753 );
541
+ $ this ->filesystem ->chmod ($ files , 0o753 );
542
542
543
543
$ this ->assertFilePermissions (753 , $ file );
544
544
$ this ->assertFilePermissions (753 , $ directory );
@@ -553,9 +553,9 @@ public function testChmodChangesZeroModeOnSubdirectoriesOnRecursive()
553
553
554
554
mkdir ($ directory );
555
555
mkdir ($ subdirectory );
556
- chmod ($ subdirectory , 0000 );
556
+ chmod ($ subdirectory , 0o000 );
557
557
558
- $ this ->filesystem ->chmod ($ directory , 0753 , 0000 , true );
558
+ $ this ->filesystem ->chmod ($ directory , 0o753 , 0o000 , true );
559
559
560
560
$ this ->assertFilePermissions (753 , $ subdirectory );
561
561
}
@@ -1294,7 +1294,7 @@ public function testMirrorCopiesLinkedDirectoryContents()
1294
1294
1295
1295
$ sourcePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'source ' .\DIRECTORY_SEPARATOR ;
1296
1296
1297
- mkdir ($ sourcePath .'nested/ ' , 0777 , true );
1297
+ mkdir ($ sourcePath .'nested/ ' , 0o777 , true );
1298
1298
file_put_contents ($ sourcePath .'/nested/file1.txt ' , 'FILE1 ' );
1299
1299
// Note: We symlink directory, not file
1300
1300
symlink ($ sourcePath .'nested ' , $ sourcePath .'link1 ' );
@@ -1315,7 +1315,7 @@ public function testMirrorCopiesRelativeLinkedContents()
1315
1315
$ sourcePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'source ' .\DIRECTORY_SEPARATOR ;
1316
1316
$ oldPath = getcwd ();
1317
1317
1318
- mkdir ($ sourcePath .'nested/ ' , 0777 , true );
1318
+ mkdir ($ sourcePath .'nested/ ' , 0o777 , true );
1319
1319
file_put_contents ($ sourcePath .'/nested/file1.txt ' , 'FILE1 ' );
1320
1320
// Note: Create relative symlink
1321
1321
chdir ($ sourcePath );
@@ -1565,7 +1565,7 @@ public function testDumpFile()
1565
1565
1566
1566
// skip mode check on Windows
1567
1567
if ('\\' !== \DIRECTORY_SEPARATOR ) {
1568
- $ oldMask = umask (0002 );
1568
+ $ oldMask = umask (0o002 );
1569
1569
}
1570
1570
1571
1571
$ this ->filesystem ->dumpFile ($ filename , 'bar ' );
@@ -1661,7 +1661,7 @@ public function testAppendToFile()
1661
1661
1662
1662
// skip mode check on Windows
1663
1663
if ('\\' !== \DIRECTORY_SEPARATOR ) {
1664
- $ oldMask = umask (0002 );
1664
+ $ oldMask = umask (0o002 );
1665
1665
}
1666
1666
1667
1667
$ this ->filesystem ->dumpFile ($ filename , 'foo ' );
@@ -1684,7 +1684,7 @@ public function testAppendToFileWithResource()
1684
1684
1685
1685
// skip mode check on Windows
1686
1686
if ('\\' !== \DIRECTORY_SEPARATOR ) {
1687
- $ oldMask = umask (0002 );
1687
+ $ oldMask = umask (0o002 );
1688
1688
}
1689
1689
1690
1690
$ this ->filesystem ->dumpFile ($ filename , 'foo ' );
@@ -1767,7 +1767,7 @@ public function testAppendToFileCreateTheFileIfNotExists()
1767
1767
1768
1768
// skip mode check on Windows
1769
1769
if ('\\' !== \DIRECTORY_SEPARATOR ) {
1770
- $ oldMask = umask (0002 );
1770
+ $ oldMask = umask (0o002 );
1771
1771
}
1772
1772
1773
1773
$ this ->filesystem ->appendToFile ($ filename , 'bar ' );
@@ -1800,7 +1800,7 @@ public function testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile()
1800
1800
1801
1801
$ filename = $ this ->workspace .\DIRECTORY_SEPARATOR .'foo.txt ' ;
1802
1802
file_put_contents ($ filename , 'FOO BAR ' );
1803
- chmod ($ filename , 0745 );
1803
+ chmod ($ filename , 0o745 );
1804
1804
1805
1805
$ this ->filesystem ->dumpFile ($ filename , 'bar ' );
1806
1806
@@ -1811,13 +1811,13 @@ public function testDumpFileCleansUpAfterFailure()
1811
1811
{
1812
1812
$ targetFile = $ this ->workspace .'/dump-file ' ;
1813
1813
$ this ->filesystem ->touch ($ targetFile );
1814
- $ this ->filesystem ->chmod ($ targetFile , 0444 );
1814
+ $ this ->filesystem ->chmod ($ targetFile , 0o444 );
1815
1815
1816
1816
try {
1817
1817
$ this ->filesystem ->dumpFile ($ targetFile , 'any content ' );
1818
1818
} catch (IOException $ e ) {
1819
1819
} finally {
1820
- $ this ->filesystem ->chmod ($ targetFile , 0666 );
1820
+ $ this ->filesystem ->chmod ($ targetFile , 0o666 );
1821
1821
}
1822
1822
1823
1823
$ this ->assertSame ([$ targetFile ], glob ($ this ->workspace .'/* ' ));
@@ -1868,7 +1868,7 @@ public function testCopyShouldKeepExecutionPermission()
1868
1868
$ targetFilePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'copy_target_file ' ;
1869
1869
1870
1870
file_put_contents ($ sourceFilePath , 'SOURCE FILE ' );
1871
- chmod ($ sourceFilePath , 0745 );
1871
+ chmod ($ sourceFilePath , 0o745 );
1872
1872
1873
1873
$ this ->filesystem ->copy ($ sourceFilePath , $ targetFilePath );
1874
1874
0 commit comments