DDC1360Test.php 924 B

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