From cf11fb9652f6c41c986d740a20429a1523cb65a5 Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Wed, 6 Sep 2017 18:24:46 -0400 Subject: [PATCH] Get KERNEL_DIR through $_ENV too for KernelTestCase --- src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index 351a8cc80a15..5dadca83f2e1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -105,8 +105,8 @@ private static function getPhpUnitCliConfigArgument() */ protected static function getKernelClass() { - if (isset($_SERVER['KERNEL_DIR'])) { - $dir = $_SERVER['KERNEL_DIR']; + if (isset($_SERVER['KERNEL_DIR']) || isset($_ENV['KERNEL_DIR'])) { + $dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : $_ENV['KERNEL_DIR']; if (!is_dir($dir)) { $phpUnitDir = static::getPhpUnitXmlDir();