Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / dbal / tests / Doctrine / Tests / DBAL / Functional / Ticket / DBAL168Test.php
1 <?php
2
3 namespace Doctrine\Tests\DBAL\Functional\Ticket;
4
5 /**
6  * @group DBAL-168
7  */
8 class DBAL168Test extends \Doctrine\Tests\DbalFunctionalTestCase
9 {
10     public function testDomainsTable()
11     {
12         if ($this->_conn->getDatabasePlatform()->getName() != "postgresql") {
13             $this->markTestSkipped('PostgreSQL only test');
14         }
15
16         $table = new \Doctrine\DBAL\Schema\Table("domains");
17         $table->addColumn('id', 'integer');
18         $table->addColumn('parent_id', 'integer');
19         $table->setPrimaryKey(array('id'));
20         $table->addForeignKeyConstraint('domains', array('parent_id'), array('id'));
21
22         $this->_conn->getSchemaManager()->createTable($table);
23         $table = $this->_conn->getSchemaManager()->listTableDetails('domains');
24
25         $this->assertEquals('domains', $table->getName());
26     }
27 }