minor #19777 [Yaml] Fix test scanning the full tmp directory (nicolas-grekas)
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Yaml] Fix test scanning the full tmp directory
| Q | A
| ------------- | ---
| Branch? | master
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
Commits
-------
d2d4b3c
[Yaml] Fix test scanning the full tmp directory
This commit is contained in:
commit
9b39c7a091
@ -115,7 +115,7 @@ EOF;
|
||||
*/
|
||||
private function createFile($content)
|
||||
{
|
||||
$filename = tempnam(sys_get_temp_dir(), 'sf-');
|
||||
$filename = tempnam(sys_get_temp_dir().'/yml-lint-test', 'sf-');
|
||||
file_put_contents($filename, $content);
|
||||
|
||||
$this->files[] = $filename;
|
||||
@ -152,7 +152,7 @@ EOF;
|
||||
->expects($this->once())
|
||||
->method('locateResource')
|
||||
->with('@AppBundle/Resources')
|
||||
->willReturn(sys_get_temp_dir());
|
||||
->willReturn(sys_get_temp_dir().'/yml-lint-test');
|
||||
|
||||
$application = $this->getMockBuilder(Application::class)
|
||||
->disableOriginalConstructor()
|
||||
@ -184,6 +184,7 @@ EOF;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
@mkdir(sys_get_temp_dir().'/yml-lint-test');
|
||||
$this->files = array();
|
||||
}
|
||||
|
||||
@ -194,5 +195,6 @@ EOF;
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
rmdir(sys_get_temp_dir().'/yml-lint-test');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user