1
0
mirror of synced 2025-01-19 06:51:40 +03:00

#1172 - writing a more concise test case about merging detached proxies

This commit is contained in:
Marco Pivetta 2015-01-16 21:09:53 +01:00
parent 318b23097b
commit dde09872df

View File

@ -22,6 +22,18 @@ class MergeUninitializedProxyTest extends \Doctrine\Tests\OrmFunctionalTestCase
}
}
public function testMergeUnserializedUnInitializedProxy()
{
$detachedUninitialized = $this->_em->getReference(MUPFile::CLASSNAME, 123);
$this->_em->clear();
$this->assertSame(
$this->_em->getReference(MUPFile::CLASSNAME, 123),
$this->_em->merge(unserialize(serialize($detachedUninitialized)))
);
}
public function testMergeUnserializedIntoEntity() {
$file = new MUPFile;
@ -177,6 +189,8 @@ class MUPPicture
*/
class MUPFile
{
const CLASSNAME = __CLASS__;
/**
* @Column(name="file_id", type="integer")
* @Id