Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / ORM / Functional / Ticket / DDC933Test.php
1 <?php
2
3 namespace Doctrine\Tests\ORM\Functional\Ticket;
4
5 use Doctrine\Common\Collections\ArrayCollection;
6 use Doctrine\Tests\Models\CMS\CmsUser;
7 use Doctrine\Tests\Models\CMS\CmsGroup;
8
9 require_once __DIR__ . '/../../../TestInit.php';
10
11 class DDC933Test extends \Doctrine\Tests\OrmFunctionalTestCase
12 {
13     public function setUp()
14     {
15         $this->useModelSet('company');
16         parent::setUp();
17     }
18
19     /**
20      * @group DDC-933
21      */
22     public function testLockCTIClass()
23     {
24         //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger());
25
26         $manager = new \Doctrine\Tests\Models\Company\CompanyManager();
27         $manager->setName('beberlei');
28         $manager->setSalary(1234);
29         $manager->setTitle('Vice Precident of This Test');
30         $manager->setDepartment("Foo");
31
32         $this->_em->persist($manager);
33         $this->_em->flush();
34
35         $this->_em->beginTransaction();
36         $this->_em->lock($manager, \Doctrine\DBAL\LockMode::PESSIMISTIC_READ);
37         $this->_em->rollback();
38     }
39 }