Skip to content

Commit f89ab24

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: improve docblocks around group sequences [WebProfilerBundle] added a note in the README [Filesystem] Skip tests on readable file when run with root user [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc [HttpFoundation][Security] forward locale and format to subrequests [Console] Send the right exit code to console.terminate listeners Caching missed templates on cache warmup
2 parents 68bc3e4 + 91f194c commit f89ab24

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Tests/FilesystemTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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

Tests/LockHandlerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function testErrorHandlingInLockIfLockPathBecomesUnwritable()
5252
$this->markTestSkipped('This test cannot run on Windows.');
5353
}
5454

55+
if (!getenv('USER') || 'root' === getenv('USER')) {
56+
$this->markTestSkipped('This test will fail if run under superuser');
57+
}
58+
5559
$lockPath = sys_get_temp_dir().'/'.uniqid('', true);
5660
$e = null;
5761
$wrongMessage = null;

0 commit comments

Comments
 (0)