DDC-2704 - trying to get all reflection properties from a partially initialized class metadata instance will result in a failure
This commit is contained in:
parent
4e08c99b86
commit
1e6c071bb8
@ -3,6 +3,7 @@
|
||||
namespace Doctrine\Tests\ORM\Mapping;
|
||||
|
||||
use Doctrine\Common\Persistence\Mapping\RuntimeReflectionService;
|
||||
use Doctrine\Common\Persistence\Mapping\StaticReflectionService;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use Doctrine\ORM\Events;
|
||||
use Doctrine\ORM\Mapping\DefaultNamingStrategy;
|
||||
@ -1137,6 +1138,20 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
|
||||
$classMetadata->getAllReflectionProperties();
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-2704
|
||||
*/
|
||||
public function testGetAllReflectionPropertiesFailsOnPartiallyInitializedMetadata()
|
||||
{
|
||||
$classMetadata = new ClassMetadata(__NAMESPACE__ . '\\MyArrayObjectEntity');
|
||||
|
||||
$classMetadata->initializeReflection(new StaticReflectionService());
|
||||
|
||||
$this->setExpectedException('RuntimeException');
|
||||
|
||||
$classMetadata->getAllReflectionProperties();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user