浏览代码

Removed $loader

Miha Vrhovnik 13 年之前
父节点
当前提交
2e96039a9e
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Tests/bootstrap.php

+ 3 - 3
Tests/bootstrap.php

@@ -15,11 +15,11 @@
  * limitations under the License.
  */
 
-$loader = include_once dirname(__DIR__).'/vendor/autoload.php';
+include_once dirname(__DIR__).'/vendor/autoload.php';
 
-Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) use ($loader) {
+Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) {
     if (0 === strpos(ltrim($class, '/'), 'JMS\SerializerBundle\Annotation')) {
-        if (file_exists($file = dirname(__DIR__).'/'.substr(str_replace('\\', '/', $class), strlen('JMS\SerializerBundle')).'.php')) {
+        if (file_exists($file = dirname(__DIR__).'/'.substr(str_replace('\\', '/', $class), strlen('JMS\SerializerBundle\\')).'.php')) {
             require_once $file;
         }
     }