Permalink
Browse files

Merge branch 'DDC-1610'

  • Loading branch information...
2 parents 44831f2 + faf9288 commit 1d46d2b9afabbd69e6953ef0a9582dbfa79a0292 @beberlei beberlei committed Jan 21, 2012
@@ -291,7 +291,6 @@ protected function loadMetadata($name)
// Invoke driver
try {
$this->driver->loadMetadataForClass($className, $class);
- $this->wakeupReflection($class, $this->getReflectionService());
} catch (ReflectionException $e) {
throw MappingException::reflectionFailure($className, $e);
}
@@ -333,6 +332,7 @@ protected function loadMetadata($name)
$eventArgs = new \Doctrine\ORM\Event\LoadClassMetadataEventArgs($class, $this->em);
$this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
}
+ $this->wakeupReflection($class, $this->getReflectionService());
$this->validateRuntimeMetadata($class, $parent);
@@ -9,6 +9,9 @@
class ClassMetadataLoadEventTest extends \Doctrine\Tests\OrmTestCase
{
+ /**
+ * @group DDC-1610
+ */
public function testEvent()
{
$em = $this->_getTestEntityManager();
@@ -17,6 +20,8 @@ public function testEvent()
$evm->addEventListener(Events::loadClassMetadata, $this);
$classMetadata = $metadataFactory->getMetadataFor('Doctrine\Tests\ORM\Mapping\LoadEventTestEntity');
$this->assertTrue($classMetadata->hasField('about'));
+ $this->assertArrayHasKey('about', $classMetadata->reflFields);
+ $this->assertInstanceOf('ReflectionProperty', $classMetadata->reflFields['about']);
}
public function loadClassMetadata(\Doctrine\ORM\Event\LoadClassMetadataEventArgs $eventArgs)
@@ -48,4 +53,4 @@ class LoadEventTestEntity
private $name;
private $about;
-}
+}

0 comments on commit 1d46d2b

Please sign in to comment.