File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
tests/Symfony/Tests/Component/Validator/Mapping/Loader Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 33require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
44
55use Symfony\Component\ClassLoader\UniversalClassLoader;
6+ use Doctrine\Common\Annotations\AnnotationRegistry;
67
78$loader = new UniversalClassLoader();
89$loader->registerNamespaces(array(
@@ -21,6 +22,12 @@ $loader->registerPrefixFallbacks(array(
2122));
2223$loader->register();
2324
25+ AnnotationRegistry::registerLoader(function($class) use ($loader) {
26+ $loader->loadClass($class);
27+ return class_exists($class, false);
28+ });
29+ AnnotationRegistry::registerFile(__DIR__.'/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
30+
2431if (is_file(__DIR__.'/vendor/swiftmailer/lib/classes/Swift.php')) {
2532 require_once __DIR__.'/vendor/swiftmailer/lib/classes/Swift.php';
2633 Swift::registerAutoload(__DIR__.'/vendor/swiftmailer/lib/swift_init.php');
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ protected function setUp()
3636 public function testLoadClassMetadataReturnsTrueIfSuccessful ()
3737 {
3838 $ reader = new AnnotationReader ();
39- $ reader ->setAutoloadAnnotations (true );
4039 $ loader = new AnnotationLoader ($ reader );
4140 $ metadata = new ClassMetadata ('Symfony\Tests\Component\Validator\Fixtures\Entity ' );
4241
You can’t perform that action at this time.
0 commit comments