From cf641cd0a3d5d494bde67a2360c0a7dac9d08cd9 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Wed, 14 Jan 2015 16:47:05 +0100 Subject: [PATCH] #881 DDC-2825 - testing annotation driver with table name defining schema name as part of the name --- .../DDC2825/SchemaAndTableInTableName.php | 20 +++++++++++++++++++ .../ORM/Mapping/AnnotationDriverTest.php | 14 +++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 tests/Doctrine/Tests/Models/DDC2825/SchemaAndTableInTableName.php diff --git a/tests/Doctrine/Tests/Models/DDC2825/SchemaAndTableInTableName.php b/tests/Doctrine/Tests/Models/DDC2825/SchemaAndTableInTableName.php new file mode 100644 index 000000000..e049befac --- /dev/null +++ b/tests/Doctrine/Tests/Models/DDC2825/SchemaAndTableInTableName.php @@ -0,0 +1,20 @@ +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()); + } } /**