Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bc54e0

Browse files
committed
minor #19779 [FrameworkBundle] Fix test scanning the full tmp directory (chalasr)
This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] Fix test scanning the full tmp directory | Q | A | ------------- | --- | Branch? | master | Tests pass? | yes/no | Fixed tickets | n/a | License | MIT Next to #19777 (my bad for both ☺️ ). @nicolas-grekas It seems there are [some similar ones](https://github.com/search?utf8=%E2%9C%93&q=tempnam%28sys_get_temp_dir%28%29%2C+repo%3Asymfony%2Fsymfony&type=Code&ref=searchresults) that need to be fixed Commits ------- bb9413b [FrameworkBundle] Fix test scanning the full tmp directory
2 parents 0fd7cdb + bb9413b commit 2bc54e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testLintFileNotReadable()
6767
*/
6868
private function createFile($content)
6969
{
70-
$filename = tempnam(sys_get_temp_dir(), 'sf-');
70+
$filename = tempnam(sys_get_temp_dir().'/framework-yml-lint-test', 'sf-');
7171
file_put_contents($filename, $content);
7272

7373
$this->files[] = $filename;
@@ -90,6 +90,7 @@ protected function createCommandTester()
9090
protected function setUp()
9191
{
9292
$this->files = array();
93+
@mkdir(sys_get_temp_dir().'/framework-yml-lint-test');
9394
}
9495

9596
protected function tearDown()
@@ -99,5 +100,7 @@ protected function tearDown()
99100
unlink($file);
100101
}
101102
}
103+
104+
rmdir(sys_get_temp_dir().'/framework-yml-lint-test');
102105
}
103106
}

0 commit comments

Comments
 (0)