diff --git a/tests/Doctrine/Tests/Models/NonPublicSchemaJoins/User.php b/tests/Doctrine/Tests/Models/NonPublicSchemaJoins/User.php new file mode 100644 index 000000000..39b78adca --- /dev/null +++ b/tests/Doctrine/Tests/Models/NonPublicSchemaJoins/User.php @@ -0,0 +1,79 @@ +id = $id; + } + + /** + * @return User[] + */ + public function getReaders() + { + return $this->readers; + } + + /** + * @param User[] $readers + * @return User + */ + public function setReaders($readers) + { + $this->readers = $readers; + + return $this; + } + + /** + * @return User[] + */ + public function getAuthors() + { + return $this->authors; + } + + /** + * @param User[] $authors + * @return User + */ + public function setAuthors($authors) + { + $this->authors = $authors; + + return $this; + } +} diff --git a/tests/Doctrine/Tests/ORM/Mapping/DefaultQuoteStrategyTest.php b/tests/Doctrine/Tests/ORM/Mapping/DefaultQuoteStrategyTest.php new file mode 100644 index 000000000..8408eb996 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/DefaultQuoteStrategyTest.php @@ -0,0 +1,27 @@ + + */ +class DefaultQuoteStrategyTest extends OrmTestCase +{ + const TEST_ENTITY = 'Doctrine\Tests\Models\NonPublicSchemaJoins\User'; + + public function testGetJoinTableName() + { + $em = $this->_getTestEntityManager(); + $metadata = $em->getClassMetadata(self::TEST_ENTITY); + $platform = $em->getConnection()->getDatabasePlatform(); + $strategy = new DefaultQuoteStrategy(); + $tableName = $strategy->getJoinTableName($metadata->associationMappings['readers'], $metadata, $platform); + $this->assertEquals($tableName, 'readers.author_reader'); + } +}