We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d797ec8 + 1c24147 commit 7e9948bCopy full SHA for 7e9948b
1 file changed
tests/Functional/CustomTestKernel.php
@@ -45,6 +45,11 @@ public function getCacheDir(): string
45
return realpath(sys_get_temp_dir()).'/NyholmBundleTest/cachePluginInteractionTest';
46
}
47
48
+ public function getShareDir(): ?string
49
+ {
50
+ return $this->getCacheDir();
51
+ }
52
+
53
/**
54
* Returns the kernel parameters.
55
*/
@@ -77,8 +82,7 @@ protected function getKernelParameters(): array
77
82
'kernel.bundles_metadata' => $bundlesMetadata,
78
83
'kernel.charset' => $this->getCharset(),
79
84
'kernel.container_class' => $this->getContainerClass(),
80
- 'kernel.share_dir' => realpath($this->getProjectDir()) ?: $this->getProjectDir(),
81
- ];
85
+ ] + (null !== ($dir = $this->getShareDir()) ? ['kernel.share_dir' => realpath($dir) ?: $dir] : []);
86
87
88
0 commit comments