Consider KERNEL_DIR setting as relative to the PhpUnit XML file if it does not point to a directory (relative to the current cwd)
This commit is contained in:
parent
4aab341d59
commit
05dc0e17b2
@ -124,7 +124,15 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected static function getKernelClass()
|
||||
{
|
||||
$dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : static::getPhpUnitXmlDir();
|
||||
$dir = $phpUnitDir = static::getPhpUnitXmlDir();
|
||||
|
||||
if (isset($_SERVER['KERNEL_DIR'])) {
|
||||
$dir = $_SERVER['KERNEL_DIR'];
|
||||
|
||||
if (!is_dir($dir) && is_dir("$phpUnitDir/$dir")) {
|
||||
$dir = "$phpUnitDir/$dir";
|
||||
}
|
||||
}
|
||||
|
||||
$finder = new Finder();
|
||||
$finder->name('*Kernel.php')->depth(0)->in($dir);
|
||||
|
Reference in New Issue
Block a user