created test case to reproduce error
This commit is contained in:
parent
9cd16ec56a
commit
cf84183c18
46
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3103Test.php
Normal file
46
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3103Test.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket;
|
||||
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
|
||||
/**
|
||||
* @group DDC-3103
|
||||
*/
|
||||
class DDC3103Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
{
|
||||
public function testIssue()
|
||||
{
|
||||
$className = __NAMESPACE__ . '\\DDC3103ArticleId';
|
||||
$classMetadata = new ClassMetadata($className);
|
||||
|
||||
$this->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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user