From cf84183c18b2a77410d201582740db3fe568e4e3 Mon Sep 17 00:00:00 2001 From: Marco Jantke Date: Tue, 29 Apr 2014 09:30:10 +0200 Subject: [PATCH] created test case to reproduce error --- .../ORM/Functional/Ticket/DDC3103Test.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3103Test.php diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3103Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3103Test.php new file mode 100644 index 000000000..9e3c38896 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3103Test.php @@ -0,0 +1,46 @@ +createAnnotationDriver()->loadMetadataForClass($className, $classMetadata); + + $this->assertTrue( + $classMetadata->isEmbeddedClass, + 'The isEmbeddedClass property should be true from the mapping data.' + ); + + $serialized = serialize($classMetadata); + $classMetadata = unserialize($serialized); + + $this->assertTrue( + $classMetadata->isEmbeddedClass, + 'The isEmbeddedClass property should still be true after serialization and unserialization.' + ); + } +} + +/** + * @Embeddable + */ +class DDC3103ArticleId +{ + /** + * @var string + * @Column(name="name", type="string", length=255) + */ + protected $nameValue; +} + +