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
This commit is contained in:
commit
2bc54e0863
@ -67,7 +67,7 @@ bar';
|
||||
*/
|
||||
private function createFile($content)
|
||||
{
|
||||
$filename = tempnam(sys_get_temp_dir(), 'sf-');
|
||||
$filename = tempnam(sys_get_temp_dir().'/framework-yml-lint-test', 'sf-');
|
||||
file_put_contents($filename, $content);
|
||||
|
||||
$this->files[] = $filename;
|
||||
@ -90,6 +90,7 @@ bar';
|
||||
protected function setUp()
|
||||
{
|
||||
$this->files = array();
|
||||
@mkdir(sys_get_temp_dir().'/framework-yml-lint-test');
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
@ -99,5 +100,7 @@ bar';
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
rmdir(sys_get_temp_dir().'/framework-yml-lint-test');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user