merged branch drak/cleanup (PR #4433)
Commits -------d046fed
[HttpFoundation] Remove temporary files after tests run Discussion ---------- [HttpFoundation] Remove temporary files after tests run Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: [yes|no] Fixes the following tickets: - Todo: - License of the code: MIT Documentation PR: - --------------------------------------------------------------------------- by travisbot at 2012-05-28T00:26:30Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1451809) (merged 30082e97 intoadf07f1e
). --------------------------------------------------------------------------- by travisbot at 2012-05-28T06:59:39Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453569) (mergedd046fede
intoadf07f1e
).
This commit is contained in:
commit
44f615595a
@ -129,6 +129,20 @@ class FileBagTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function createTempFile()
|
protected function createTempFile()
|
||||||
{
|
{
|
||||||
return tempnam(sys_get_temp_dir(), 'FormTest');
|
return tempnam(sys_get_temp_dir().'/form_test', 'FormTest');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
mkdir(sys_get_temp_dir().'/form_test', 0777, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function tearDown()
|
||||||
|
{
|
||||||
|
foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) {
|
||||||
|
unlink($file);
|
||||||
|
}
|
||||||
|
|
||||||
|
rmdir(sys_get_temp_dir().'/form_test');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user