Skip to content

Commit 92f3179

Browse files
committed
bug symfony#16633 [Filesystem] Fixed failing test due to tempdir symlink (toretto460)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes symfony#16633). Discussion ---------- [Filesystem] Fixed failing test due to tempdir symlink | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#16632 | License | MIT | Doc PR | Fixes the failing test referred in symfony#16632 Commits ------- 3aee6b9 Fix: Resolve tempdir symlink, not working on OSX
2 parents 551d164 + 3aee6b9 commit 92f3179

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1042,8 +1042,8 @@ public function testTempnamOnUnwritableFallsBackToSysTmp()
10421042
$dirname = $scheme.$this->workspace.DIRECTORY_SEPARATOR.'does_not_exist';
10431043

10441044
$filename = $this->filesystem->tempnam($dirname, 'bar');
1045-
1046-
$this->assertStringStartsWith(rtrim($scheme.sys_get_temp_dir(), DIRECTORY_SEPARATOR), $filename);
1045+
$realTempDir = realpath(sys_get_temp_dir());
1046+
$this->assertStringStartsWith(rtrim($scheme.$realTempDir, DIRECTORY_SEPARATOR), $filename);
10471047
$this->assertFileExists($filename);
10481048

10491049
// Tear down

0 commit comments

Comments
 (0)