tests/Doctrine/Tests/OrmTestCase.php 1 location
|
@@ 65-72 (lines=8) @@
|
| 62 |
|
* |
| 63 |
|
* @return \Doctrine\ORM\Mapping\Driver\AnnotationDriver |
| 64 |
|
*/ |
| 65 |
|
protected function createAnnotationDriver($paths = []) |
| 66 |
|
{ |
| 67 |
|
$reader = new Annotations\CachedReader(new Annotations\AnnotationReader(), new ArrayCache()); |
| 68 |
|
|
| 69 |
|
Annotations\AnnotationRegistry::registerFile(__DIR__ . "/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php"); |
| 70 |
|
|
| 71 |
|
return new AnnotationDriver($reader, (array) $paths); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
/** |
| 75 |
|
* Creates an EntityManager for testing purposes. |
lib/Doctrine/ORM/Configuration.php 1 location
|
@@ 173-180 (lines=8) @@
|
| 170 |
|
* |
| 171 |
|
* @return AnnotationDriver |
| 172 |
|
*/ |
| 173 |
|
public function newDefaultAnnotationDriver($paths = []) |
| 174 |
|
{ |
| 175 |
|
AnnotationRegistry::registerFile(__DIR__ . '/Annotation/DoctrineAnnotations.php'); |
| 176 |
|
|
| 177 |
|
$reader = new CachedReader(new AnnotationReader(), new ArrayCache()); |
| 178 |
|
|
| 179 |
|
return new AnnotationDriver($reader, (array) $paths); |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
/** |
| 183 |
|
* Adds a namespace under a certain alias. |