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