From 4e08c99b868be8d4e09e97af0a896b801e98b5ab Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 20 Jan 2015 14:54:51 +0100 Subject: [PATCH] DDC-2704 - trying to get all reflection properties from an unitialized class metadata instance will result in a failure --- .../Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index 0ffb41c18..5de685733 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -1125,6 +1125,18 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase $this->assertInstanceOf(__NAMESPACE__ . '\\MyArrayObjectEntity', $classMetadata->newInstance()); } + + /** + * @group DDC-2704 + */ + public function testGetAllReflectionPropertiesFailsOnNonInitializedMetadata() + { + $classMetadata = new ClassMetadata(__NAMESPACE__ . '\\MyArrayObjectEntity'); + + $this->setExpectedException('RuntimeException'); + + $classMetadata->getAllReflectionProperties(); + } } /**