#1172 - correcting test: all connections should have a saved file instance
This commit is contained in:
parent
d1e7960f99
commit
b7566dc65b
@ -68,19 +68,23 @@ class MergeUninitializedProxyTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
$this->assertFalse($managed->__isInitialized());
|
$this->assertFalse($managed->__isInitialized());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMergingProxyFromDifferentEntityManagerDoesNotReplaceInitializer()
|
public function testMergingProxyFromDifferentEntityManagerWithExistingManagedInstanceDoesNotReplaceInitializer()
|
||||||
{
|
{
|
||||||
$em1 = $this->createEntityManager($logger1 = new DebugStack());
|
$em1 = $this->createEntityManager($logger1 = new DebugStack());
|
||||||
$em2 = $this->createEntityManager($logger2 = new DebugStack());
|
$em2 = $this->createEntityManager($logger2 = new DebugStack());
|
||||||
|
|
||||||
$file1 = new MUPFile();
|
$file1 = new MUPFile();
|
||||||
|
$file2 = new MUPFile();
|
||||||
|
|
||||||
$em1->persist($file1);
|
$em1->persist($file1);
|
||||||
|
$em2->persist($file2);
|
||||||
$em1->flush();
|
$em1->flush();
|
||||||
|
$em2->flush();
|
||||||
$em1->clear();
|
$em1->clear();
|
||||||
|
$em2->clear();
|
||||||
|
|
||||||
$queryCount1 = count($logger1->queries);
|
$queryCount1 = count($logger1->queries);
|
||||||
$queryCount2 = count($logger1->queries);
|
$queryCount2 = count($logger2->queries);
|
||||||
|
|
||||||
$proxy1 = $em1->getReference(MUPFile::CLASSNAME, $file1->fileId);
|
$proxy1 = $em1->getReference(MUPFile::CLASSNAME, $file1->fileId);
|
||||||
$proxy2 = $em2->getReference(MUPFile::CLASSNAME, $file1->fileId);
|
$proxy2 = $em2->getReference(MUPFile::CLASSNAME, $file1->fileId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user