浏览代码

[SecurityBundle] Fix autoloading in tests (autoload.php overrides autoload.php.dist when it exists)

Victor Berchet 13 年之前
父节点
当前提交
1515912e2e
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php

+ 5 - 0
src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php

@@ -17,6 +17,11 @@ $lastDir = null;
 while ($dir !== $lastDir) {
     $lastDir = $dir;
 
+    if (file_exists($dir.'/autoload.php')) {
+        require_once $dir.'/autoload.php';
+        break;
+    }
+
     if (file_exists($dir.'/autoload.php.dist')) {
         require_once $dir.'/autoload.php.dist';
         break;