浏览代码

merged branch vicb/SecurityBundle/Tests/autoload (PR #1979)

Commits
-------

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

Discussion
----------

[SecurityBundle] Fix autoloading in tests

autoload.php should override autoload.php.dist when it exists
Fabien Potencier 13 年之前
父节点
当前提交
b24251a0ff
共有 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;