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
2828 */
2929 private $ cachePrefix = '' ;
3030
31+ /**
32+ * @var string|null;
33+ */
34+ private $ fakedProjectDir ;
35+
3136 /**
3237 * @param string $cachePrefix
3338 */
@@ -65,6 +70,31 @@ public function getLogDir()
6570 return sys_get_temp_dir ().'/NyholmBundleTest/log ' ;
6671 }
6772
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+
6898 public function registerBundles ()
6999 {
70100 $ this ->bundlesToRegister = array_unique ($ this ->bundlesToRegister );
You can’t perform that action at this time.
0 commit comments