Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / ORM / Functional / Ticket / DDC588Test.php
1 <?php
2 namespace Doctrine\Tests\ORM\Functional\Ticket;
3
4 require_once __DIR__ . '/../../../TestInit.php';
5
6 class DDC588Test extends \Doctrine\Tests\OrmFunctionalTestCase
7 {
8     protected function setUp()
9     {
10         parent::setUp();
11         $this->_schemaTool->createSchema(array(
12             $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC588Site'),
13         ));
14     }
15
16     public function testIssue()
17     {
18         $site = new DDC588Site('Foo');
19
20         $this->_em->persist($site);
21         $this->_em->flush();
22         // Following should not result in exception
23         $this->_em->refresh($site);
24     }
25 }
26
27 /**
28  * @Entity
29  */
30 class DDC588Site
31 {
32     /**
33      * @Id
34      * @Column(type="integer", name="site_id")
35      * @GeneratedValue
36      */
37     public $id;
38
39     /**
40      * @Column(type="string", length=45)
41      */
42     protected $name = null;
43
44     public function __construct($name = '')
45     {
46         $this->name = $name;
47     }
48 }