Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / ORM / Functional / Ticket / DDC1360Test.php
1 <?php
2
3 namespace Doctrine\Tests\ORM\Functional\Ticket;
4
5 use Doctrine\Tests\OrmFunctionalTestCase;
6
7 /**
8  * @group DDC-1360
9  */
10 class DDC1360Test extends OrmFunctionalTestCase
11 {
12     public function testSchemaDoubleQuotedCreate()
13     {
14         if ($this->_em->getConnection()->getDatabasePlatform()->getName() != "postgresql") {
15             $this->markTestSkipped("PostgreSQL only test.");
16         }
17
18         $sql = $this->_schemaTool->getCreateSchemaSQL(array(
19             $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1360DoubleQuote')
20         ));
21
22         $this->assertEquals(array(
23             'CREATE TABLE "user"."user" (id INT NOT NULL, PRIMARY KEY(id))',
24             'CREATE SEQUENCE "user"."user_id_seq" INCREMENT BY 1 MINVALUE 1 START 1',
25         ), $sql);
26     }
27 }
28
29 /**
30  * @Entity @Table(name="`user`.`user`")
31  */
32 class DDC1360DoubleQuote
33 {
34     /** @Id @GeneratedValue @Column(type="integer") */
35     public $id;
36 }
37