make cache per user (on linux)

This commit is contained in:
Remi Collet
2015-11-02 15:07:45 +01:00
parent a4597a4c00
commit da5cac6b54
+2 -1
View File
@@ -152,7 +152,8 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
public function testExtensionsAreNotInitializedWhenRenderingACompiledTemplate()
{
$cache = new Twig_Cache_Filesystem($dir = sys_get_temp_dir().'/twig');
$uid = (function_exists('posix_getuid') ? posix_getuid() : '');
$cache = new Twig_Cache_Filesystem($dir = sys_get_temp_dir().'/twig'.$uid);
$options = array('cache' => $cache, 'auto_reload' => false, 'debug' => false);
// force compilation