File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ class AppKernel extends Kernel
28
28
*/
29
29
private $ cachePrefix = '' ;
30
30
31
+ /**
32
+ * @var string|null;
33
+ */
34
+ private $ fakedProjectDir ;
35
+
31
36
/**
32
37
* @param string $cachePrefix
33
38
*/
@@ -65,6 +70,31 @@ public function getLogDir()
65
70
return sys_get_temp_dir ().'/NyholmBundleTest/log ' ;
66
71
}
67
72
73
+ public function getProjectDir ()
74
+ {
75
+ if (null === $ this ->fakedProjectDir ) {
76
+ return realpath (__DIR__ .'/../../../../ ' );
77
+ }
78
+
79
+ return $ this ->fakedProjectDir ;
80
+ }
81
+
82
+ /**
83
+ * @param string|null $rootDir
84
+ */
85
+ public function setRootDir ($ rootDir )
86
+ {
87
+ $ this ->rootDir = $ rootDir ;
88
+ }
89
+
90
+ /**
91
+ * @param string|null $projectDir
92
+ */
93
+ public function setProjectDir ($ projectDir )
94
+ {
95
+ $ this ->fakedProjectDir = $ projectDir ;
96
+ }
97
+
68
98
public function registerBundles ()
69
99
{
70
100
$ this ->bundlesToRegister = array_unique ($ this ->bundlesToRegister );
You can’t perform that action at this time.
0 commit comments