Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Register DoctrineAnnotations on call to OrmTestCase::createAnnotationDri... #200

Merged
merged 1 commit into from

2 participants

@velovint

...ver()

Several tests were failing on reading annotations when executed alone. They passed in batch because on of earlier tests called Configuration::newDefaultAnnotationDriver() which automatically registers DoctrineAnnotations().

@velovint

Here is how I verified result.

for test in $(find tests/ -name '*Test.php'); do phpunit $test >> /tmp/phpunit.log; [ $? -ne 0 ] && echo $test; done
Note, that some tests still fail due to empty *Test files.

@beberlei beberlei merged commit 2b7360e into from
@elHornair elHornair referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 20, 2011
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  tests/Doctrine/Tests/OrmTestCase.php
View
2  tests/Doctrine/Tests/OrmTestCase.php
@@ -52,6 +52,8 @@ protected function createAnnotationDriver($paths = array(), $alias = null)
$reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\');
}
}
+ \Doctrine\Common\Annotations\AnnotationRegistry::registerFile(
+ __DIR__ . "/../../../lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php");
return new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, (array)$paths);
}
Something went wrong with that request. Please try again.