1
0
mirror of synced 2025-02-02 21:41:45 +03:00

#5689 removed OidReuseTest, which was moved to UnitOfWork tests

This commit is contained in:
Marco Pivetta 2016-09-10 20:15:59 +02:00
parent e73428a051
commit 147f8fffff

View File

@ -1,42 +0,0 @@
<?php
namespace Doctrine\Tests\ORM\Functional;
use Doctrine\Tests\Models\CMS\CmsUser;
use Doctrine\Tests\OrmFunctionalTestCase;
class OidReuseTest extends OrmFunctionalTestCase
{
private $userId;
/**
* {@inheritDoc}
*/
protected function setUp()
{
$this->useModelSet('cms');
parent::setUp();
}
public function testOidReuse()
{
$uow = $this->_em->getUnitOfWork();
$reflexion = new \ReflectionClass(get_class($uow));
$originalEntityDataProperty = $reflexion->getProperty('originalEntityData');
$originalEntityDataProperty->setAccessible(true);
$user = new CmsUser();
$oid = spl_object_hash($user);
$this->_em->merge($user);
$user = null;
$this->assertArrayNotHasKey($oid, $originalEntityDataProperty->getValue($uow));
$user = new CmsUser();
$this->_em->persist($user);
}
}