Get KERNEL_DIR through $_ENV too for KernelTestCase

This commit is contained in:
Yonel Ceruto 2017-09-06 18:24:46 -04:00
parent d1fe4153a1
commit cf11fb9652
1 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,8 @@ abstract class KernelTestCase extends TestCase
*/
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();