DDC-3272 - minor cleanups - inspecting a test failure related with @Doctrine\ORM\Mapping\Table
autoloading
This commit is contained in:
parent
ffe38e5088
commit
dd9a6bea0a
@ -11,8 +11,9 @@ use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
|
|||||||
use Doctrine\ORM\Tools\EntityGenerator;
|
use Doctrine\ORM\Tools\EntityGenerator;
|
||||||
use Doctrine\Tests\Models\DDC2372\DDC2372Admin;
|
use Doctrine\Tests\Models\DDC2372\DDC2372Admin;
|
||||||
use Doctrine\Tests\Models\DDC2372\DDC2372User;
|
use Doctrine\Tests\Models\DDC2372\DDC2372User;
|
||||||
|
use Doctrine\Tests\OrmTestCase;
|
||||||
|
|
||||||
class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
class EntityGeneratorTest extends OrmTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -292,22 +293,17 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
public function testMappedSuperclassAnnotationGeneration()
|
public function testMappedSuperclassAnnotationGeneration()
|
||||||
{
|
{
|
||||||
$metadata = new ClassMetadataInfo($this->_namespace . '\EntityGeneratorBook');
|
$metadata = new ClassMetadataInfo($this->_namespace . '\EntityGeneratorBook');
|
||||||
|
|
||||||
$metadata->namespace = $this->_namespace;
|
$metadata->namespace = $this->_namespace;
|
||||||
$metadata->isMappedSuperclass = true;
|
$metadata->isMappedSuperclass = true;
|
||||||
|
|
||||||
$this->_generator->setAnnotationPrefix('ORM\\');
|
$this->_generator->setAnnotationPrefix('ORM\\');
|
||||||
$this->_generator->writeEntityClass($metadata, $this->_tmpDir);
|
$this->_generator->writeEntityClass($metadata, $this->_tmpDir);
|
||||||
|
$this->newInstance($metadata); // force instantiation (causes autoloading to kick in)
|
||||||
|
|
||||||
// force instantiation (causes autoloading to kick in)
|
$driver = new AnnotationDriver(new AnnotationReader(), array());
|
||||||
$this->newInstance($metadata);
|
|
||||||
|
|
||||||
$cm = new ClassMetadata($metadata->name);
|
$cm = new ClassMetadata($metadata->name);
|
||||||
|
|
||||||
$cm->initializeReflection(new RuntimeReflectionService);
|
$cm->initializeReflection(new RuntimeReflectionService);
|
||||||
|
|
||||||
$driver = new AnnotationDriver(new AnnotationReader(), array());
|
|
||||||
|
|
||||||
$driver->loadMetadataForClass($cm->name, $cm);
|
$driver->loadMetadataForClass($cm->name, $cm);
|
||||||
|
|
||||||
$this->assertTrue($cm->isMappedSuperclass);
|
$this->assertTrue($cm->isMappedSuperclass);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user