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 into adf07f1e).

---------------------------------------------------------------------------

by travisbot at 2012-05-28T06:59:39Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453569) (merged d046fede into adf07f1e).
This commit is contained in:
Fabien Potencier 2012-05-30 07:13:13 +02:00
commit 44f615595a

View File

@ -129,6 +129,20 @@ class FileBagTest extends \PHPUnit_Framework_TestCase
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');
}
}