@@ -30,6 +30,10 @@ class AbstractResetPasswordTestKernel extends Kernel
30
30
{
31
31
use MicroKernelTrait;
32
32
33
+ private $ cacheDir ;
34
+
35
+ private $ logDir ;
36
+
33
37
public function __construct ()
34
38
{
35
39
parent ::__construct ('test ' , true );
@@ -46,12 +50,20 @@ public function registerBundles()
46
50
47
51
public function getCacheDir ()
48
52
{
49
- return \sys_get_temp_dir ().'/cache ' .\spl_object_hash ($ this );
53
+ if (null === $ this ->cacheDir ) {
54
+ return \sys_get_temp_dir ().'/cache ' .\spl_object_hash ($ this );
55
+ }
56
+
57
+ return $ this ->cacheDir ;
50
58
}
51
59
52
60
public function getLogDir ()
53
61
{
54
- return \sys_get_temp_dir ().'/logs ' .\spl_object_hash ($ this );
62
+ if (null === $ this ->logDir ) {
63
+ return \sys_get_temp_dir ().'/logs ' .\spl_object_hash ($ this );
64
+ }
65
+
66
+ return $ this ->logDir ;
55
67
}
56
68
57
69
protected function configureRoutes (RoutingConfigurator $ routes )
@@ -69,7 +81,7 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
69
81
$ container ->loadFromExtension ('doctrine ' , [
70
82
'dbal ' => [
71
83
'driver ' => 'pdo_sqlite ' ,
72
- 'url ' => 'sqlite:///fake ' ,
84
+ 'url ' => 'sqlite:/// ' . $ this -> getCacheDir (). ' /app.db ' ,
73
85
],
74
86
'orm ' => [
75
87
'auto_generate_proxy_classes ' => true ,
0 commit comments