Skip to content

Commit 05dc0e1

Browse files
committed
Consider KERNEL_DIR setting as relative to the PhpUnit XML file if it does not point to a directory (relative to the current cwd)
1 parent 4aab341 commit 05dc0e1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,15 @@ private static function getPhpUnitCliConfigArgument()
124124
*/
125125
protected static function getKernelClass()
126126
{
127-
$dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : static::getPhpUnitXmlDir();
127+
$dir = $phpUnitDir = static::getPhpUnitXmlDir();
128+
129+
if (isset($_SERVER['KERNEL_DIR'])) {
130+
$dir = $_SERVER['KERNEL_DIR'];
131+
132+
if (!is_dir($dir) && is_dir("$phpUnitDir/$dir")) {
133+
$dir = "$phpUnitDir/$dir";
134+
}
135+
}
128136

129137
$finder = new Finder();
130138
$finder->name('*Kernel.php')->depth(0)->in($dir);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy