#881 DDC-2825 - testing annotation driver with table name defining schema name as part of the name
This commit is contained in:
parent
8b2b54c033
commit
cf641cd0a3
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\Models\DDC2825;
|
||||
|
||||
/**
|
||||
* Quoted column name to check that sequence names are
|
||||
* correctly handled
|
||||
*
|
||||
* @Entity
|
||||
* @Table(name="myschema.mytable")
|
||||
*/
|
||||
class SchemaAndTableInTableName
|
||||
{
|
||||
const CLASSNAME = __CLASS__;
|
||||
|
||||
/**
|
||||
* @Id @Column()
|
||||
*/
|
||||
public $id;
|
||||
}
|
@ -5,6 +5,7 @@ namespace Doctrine\Tests\ORM\Mapping;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use Doctrine\ORM\Events;
|
||||
use Doctrine\Tests\Models\DDC2825\ExplicitSchemaAndTable;
|
||||
use Doctrine\Tests\Models\DDC2825\SchemaAndTableInTableName;
|
||||
|
||||
class AnnotationDriverTest extends AbstractMappingDriverTest
|
||||
{
|
||||
@ -244,6 +245,19 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
|
||||
$this->assertSame('myschema', $metadata->getSchemaName());
|
||||
$this->assertSame('mytable', $metadata->getTableName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-2825
|
||||
* @group 881
|
||||
*/
|
||||
public function testSchemaDefinitionViaSchemaDefinedInTableNameInTableAnnotationProperty()
|
||||
{
|
||||
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
|
||||
$metadata = $this->createClassMetadataFactory()->getMetadataFor(SchemaAndTableInTableName::CLASSNAME);
|
||||
|
||||
$this->assertSame('myschema', $metadata->getSchemaName());
|
||||
$this->assertSame('mytable', $metadata->getTableName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user