2015-02-26 17:11:42 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\Tests\ORM\Mapping;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping\DefaultQuoteStrategy;
|
2015-03-17 23:58:53 +00:00
|
|
|
use Doctrine\Tests\Models\NonPublicSchemaJoins\User as NonPublicSchemaUser;
|
2015-02-26 17:11:42 +03:00
|
|
|
use Doctrine\Tests\OrmTestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Doctrine\Tests\ORM\Mapping\DefaultQuoteStrategyTest
|
|
|
|
*
|
|
|
|
* @author Ivan Molchanov <ivan.molchanov@opensoftdev.ru>
|
|
|
|
*/
|
|
|
|
class DefaultQuoteStrategyTest extends OrmTestCase
|
|
|
|
{
|
2015-03-17 23:15:07 +00:00
|
|
|
/**
|
|
|
|
* @group DDC-3590
|
|
|
|
* @group 1316
|
|
|
|
*/
|
2015-02-26 17:11:42 +03:00
|
|
|
public function testGetJoinTableName()
|
|
|
|
{
|
2015-03-17 23:14:13 +00:00
|
|
|
$em = $this->_getTestEntityManager();
|
2015-03-17 23:58:53 +00:00
|
|
|
$metadata = $em->getClassMetadata(NonPublicSchemaUser::CLASSNAME);
|
2015-03-17 23:14:13 +00:00
|
|
|
/* @var $platform \Doctrine\DBAL\Platforms\AbstractPlatform */
|
2015-02-26 17:11:42 +03:00
|
|
|
$strategy = new DefaultQuoteStrategy();
|
2015-03-17 23:14:13 +00:00
|
|
|
$platform = $this->getMockForAbstractClass('Doctrine\DBAL\Platforms\AbstractPlatform');
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
'readers.author_reader',
|
|
|
|
$strategy->getJoinTableName($metadata->associationMappings['readers'], $metadata, $platform)
|
|
|
|
);
|
2015-02-26 17:11:42 +03:00
|
|
|
}
|
|
|
|
}
|