Skip to content

Commit 7206951

Browse files
authored
Make sure we use different cache directories every time we run the tests (#205)
* Make sure we use different cache directories every time we run the tests * Renamed variable
1 parent 1627ff4 commit 7206951

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Tests/Resources/app/AppKernel.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ class AppKernel extends Kernel
1111
{
1212
use MicroKernelTrait;
1313

14+
/**
15+
* @var string
16+
*/
17+
private static $cacheDir;
18+
1419
/**
1520
* {@inheritdoc}
1621
*/
@@ -55,7 +60,10 @@ protected function configureRoutes(RouteCollectionBuilder $routes)
5560
*/
5661
public function getCacheDir()
5762
{
58-
return sys_get_temp_dir().'/httplug-bundle/cache';
63+
if (null === self::$cacheDir) {
64+
self::$cacheDir = uniqid('cache');
65+
}
66+
return sys_get_temp_dir().'/httplug-bundle/'.self::$cacheDir;
5967
}
6068

6169
/**

0 commit comments

Comments
 (0)