Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b79f48

Browse files
bug #24115 [FrameworkBundle] Get KERNEL_DIR through $_ENV too for KernelTestCase (yceruto)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Get KERNEL_DIR through $_ENV too for KernelTestCase | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - See #24113 Commits ------- cf11fb9 Get KERNEL_DIR through $_ENV too for KernelTestCase
2 parents d1fe415 + cf11fb9 commit 2b79f48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ private static function getPhpUnitCliConfigArgument()
105105
*/
106106
protected static function getKernelClass()
107107
{
108-
if (isset($_SERVER['KERNEL_DIR'])) {
109-
$dir = $_SERVER['KERNEL_DIR'];
108+
if (isset($_SERVER['KERNEL_DIR']) || isset($_ENV['KERNEL_DIR'])) {
109+
$dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : $_ENV['KERNEL_DIR'];
110110

111111
if (!is_dir($dir)) {
112112
$phpUnitDir = static::getPhpUnitXmlDir();

0 commit comments

Comments
 (0)