1
0
mirror of synced 2025-02-09 16:59:26 +03:00

37 lines
843 B
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
2017-05-31 07:59:04 +02:00
use Doctrine\DBAL\LockMode;
use Doctrine\Tests\Models\Company\CompanyManager;
use Doctrine\Tests\OrmFunctionalTestCase;
class DDC933Test extends OrmFunctionalTestCase
{
public function setUp()
{
$this->useModelSet('company');
2017-05-31 07:59:04 +02:00
parent::setUp();
}
/**
* @group DDC-933
*/
public function testLockCTIClass()
{
2017-05-31 07:59:04 +02:00
$manager = new CompanyManager();
$manager->setName('beberlei');
$manager->setSalary(1234);
2013-03-11 00:08:58 +00:00
$manager->setTitle('Vice President of This Test');
$manager->setDepartment("Foo");
$this->_em->persist($manager);
$this->_em->flush();
$this->_em->beginTransaction();
2017-05-31 07:59:04 +02:00
$this->_em->lock($manager, LockMode::PESSIMISTIC_READ);
$this->_em->rollback();
}
}