Merge branch '2.3' into 2.5

* 2.3:
  [Filesystem] enforce umask while testing
  [TwigBridge] moved fixtures into their own directory

Conflicts:
	src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
This commit is contained in:
Fabien Potencier 2015-01-03 22:04:44 +01:00
commit 6b5cb6a3b8
10 changed files with 6 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
$loader = new StubFilesystemLoader(array(
__DIR__.'/../../Resources/views/Form',
__DIR__,
__DIR__.'/Fixtures/templates/form',
));
$environment = new \Twig_Environment($loader, array('strict_variables' => true));

View File

@ -41,7 +41,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
$loader = new StubFilesystemLoader(array(
__DIR__.'/../../Resources/views/Form',
__DIR__,
__DIR__.'/Fixtures/templates/form',
));
$environment = new \Twig_Environment($loader, array('strict_variables' => true));

View File

@ -13,6 +13,8 @@ namespace Symfony\Component\Filesystem\Tests;
class FilesystemTestCase extends \PHPUnit_Framework_TestCase
{
private $umask;
/**
* @var string $workspace
*/
@ -37,6 +39,7 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
public function setUp()
{
$this->umask = umask(0);
$this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().rand(0, 1000);
mkdir($this->workspace, 0777, true);
$this->workspace = realpath($this->workspace);
@ -45,6 +48,7 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase
public function tearDown()
{
$this->clean($this->workspace);
umask($this->umask);
}
/**