1
0
mirror of synced 2025-03-04 11:53:19 +03:00

Added test to demonstrate issue

This commit is contained in:
Carnage 2015-01-10 13:59:29 +00:00 committed by Marco Pivetta
parent 71f446f23b
commit 4e4637de2e

View File

@ -152,6 +152,19 @@ class OptimisticTest extends \Doctrine\Tests\OrmFunctionalTestCase
}
}
public function testLockWorksWithProxy()
{
$test = new OptimisticStandard();
$test->name = 'test';
$this->_em->persist($test);
$this->_em->flush();
$this->_em->clear();
$proxy = $this->_em->getReference('Doctrine\Tests\ORM\Functional\Locking\OptimisticStandard', $test->id);
$this->_em->lock($proxy, LockMode::OPTIMISTIC, 1);
}
public function testOptimisticTimestampSetsDefaultValue()
{
$test = new OptimisticTimestamp();