Skip to content

Commit

Permalink
bug #24115 [FrameworkBundle] Get KERNEL_DIR through $_ENV too for Ker…
Browse files Browse the repository at this point in the history
…nelTestCase (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
  • Loading branch information
nicolas-grekas committed Sep 7, 2017
2 parents d1fe415 + cf11fb9 commit 2b79f48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
Expand Up @@ -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();
Expand Down

0 comments on commit 2b79f48

Please sign in to comment.