-
-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DCOM-204] Fix include of entities inside PHAR.
- Loading branch information
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/Doctrine/Tests/Common/Persistence/Mapping/AnnotationDriverTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Doctrine\Tests\Common\Persistence\Mapping; | ||
|
||
use Doctrine\Common\Annotations\AnnotationReader; | ||
use Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver; | ||
use Doctrine\Common\Persistence\Mapping\ClassMetadata; | ||
|
||
class AnnotationDriverTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function testGetAllClassNames() | ||
{ | ||
$reader = new AnnotationReader(); | ||
$driver = new SimpleAnnotationDriver($reader, array(__DIR__ . '/_files/annotation')); | ||
|
||
$classes = $driver->getAllClassNames(); | ||
|
||
$this->assertEquals(array('Doctrine\TestClass'), $classes); | ||
} | ||
} | ||
|
||
class SimpleAnnotationDriver extends AnnotationDriver | ||
{ | ||
protected $entityAnnotationClasses = array('Doctrine\Entity' => true); | ||
|
||
public function loadMetadataForClass($className, ClassMetadata $metadata) | ||
{ | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/Doctrine/Tests/Common/Persistence/Mapping/_files/annotation/TestClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Doctrine; | ||
|
||
/** | ||
* @Doctrine\Entity | ||
*/ | ||
class TestClass | ||
{ | ||
} | ||
|
||
/** | ||
* @Annotation | ||
*/ | ||
class Entity | ||
{ | ||
} |