Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DDC-1360 - Bugfix in quoting mechanism inside ClassMetadataInfo
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1360Test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace Doctrine\Tests\ORM\Functional\Ticket; | ||
|
||
use Doctrine\Tests\OrmFunctionalTestCase; | ||
|
||
/** | ||
* @group DDC-1360 | ||
*/ | ||
class DDC1360Test extends OrmFunctionalTestCase | ||
{ | ||
public function testSchemaDoubleQuotedCreate() | ||
{ | ||
if ($this->_em->getConnection()->getDatabasePlatform()->getName() != "postgresql") { | ||
$this->markTestSkipped("PostgreSQL only test."); | ||
} | ||
|
||
$sql = $this->_schemaTool->getCreateSchemaSQL(array( | ||
$this->_em->getClassMetadata(__NAMESPACE__ . '\DDC1360DoubleQuote') | ||
)); | ||
|
||
$this->assertEquals(array( | ||
'CREATE TABLE "user"."user" (id INT NOT NULL, PRIMARY KEY(id))', | ||
'CREATE SEQUENCE "user".user_id_seq INCREMENT BY 1 MINVALUE 1 START 1', | ||
), $sql); | ||
} | ||
} | ||
|
||
/** | ||
* @Entity @Table(name="`user`.`user`") | ||
*/ | ||
class DDC1360DoubleQuote | ||
{ | ||
/** @Id @GeneratedValue @Column(type="integer") */ | ||
public $id; | ||
} | ||
|