1
0
mirror of synced 2025-01-31 12:32:59 +03:00
doctrine2/tests/Doctrine/Tests/ORM/Mapping/DefaultQuoteStrategyTest.php

28 lines
839 B
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\ORM\Mapping;
use Doctrine\ORM\Mapping\DefaultQuoteStrategy;
use Doctrine\Tests\OrmTestCase;
/**
* Doctrine\Tests\ORM\Mapping\DefaultQuoteStrategyTest
*
* @author Ivan Molchanov <ivan.molchanov@opensoftdev.ru>
*/
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');
}
}