1
0
mirror of synced 2025-02-03 13:59:27 +03:00

44 lines
1.0 KiB
PHP
Raw Normal View History

2014-04-29 09:30:10 +02:00
<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\Mapping\ClassMetadata;
/**
* @group DDC-3103
*/
class DDC3103Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
2014-04-29 13:12:17 +02:00
/**
* @covers \Doctrine\ORM\Mapping\ClassMetadataInfo::__sleep
*/
2014-04-29 09:30:10 +02:00
public function testIssue()
{
$classMetadata = new ClassMetadata(DDC3103ArticleId::class);
2014-04-29 09:30:10 +02:00
$this->createAnnotationDriver()->loadMetadataForClass(DDC3103ArticleId::class, $classMetadata);
2014-04-29 09:30:10 +02:00
$this->assertTrue(
$classMetadata->isEmbeddedClass,
'The isEmbeddedClass property should be true from the mapping data.'
);
$this->assertTrue(
2014-04-29 13:12:17 +02:00
unserialize(serialize($classMetadata))->isEmbeddedClass,
2014-04-29 09:30:10 +02:00
'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;
}