1
0
mirror of synced 2025-01-31 12:32:59 +03:00

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:
Marco Pivetta 2015-01-20 14:55:42 +01:00
parent 4e08c99b86
commit 1e6c071bb8

View File

@ -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();
}
}
/**