File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ public function testCopyUnreadableFileFails()
5050 $ this ->markTestSkipped ('This test cannot run on Windows. ' );
5151 }
5252
53+ if (!getenv ('USER ' ) || 'root ' === getenv ('USER ' )) {
54+ $ this ->markTestSkipped ('This test will fail if run under superuser ' );
55+ }
56+
5357 $ sourceFilePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'copy_source_file ' ;
5458 $ targetFilePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'copy_target_file ' ;
5559
@@ -124,6 +128,10 @@ public function testCopyWithOverrideWithReadOnlyTargetFails()
124128 $ this ->markTestSkipped ('This test cannot run on Windows. ' );
125129 }
126130
131+ if (!getenv ('USER ' ) || 'root ' === getenv ('USER ' )) {
132+ $ this ->markTestSkipped ('This test will fail if run under superuser ' );
133+ }
134+
127135 $ sourceFilePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'copy_source_file ' ;
128136 $ targetFilePath = $ this ->workspace .\DIRECTORY_SEPARATOR .'copy_target_file ' ;
129137
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ public function testErrorHandlingInLockIfLockPathBecomesUnwritable()
4949 $ this ->markTestSkipped ('This test cannot run on Windows. ' );
5050 }
5151
52+ if (!getenv ('USER ' ) || 'root ' === getenv ('USER ' )) {
53+ $ this ->markTestSkipped ('This test will fail if run under superuser ' );
54+ }
55+
5256 $ lockPath = sys_get_temp_dir ().'/ ' .uniqid ('' , true );
5357 $ e = null ;
5458 $ wrongMessage = null ;
You can’t perform that action at this time.
0 commit comments