Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 05dc0e1

Browse filesBrowse 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
Copy full SHA for 05dc0e1

File tree

Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
+9-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.