1
0
mirror of synced 2025-02-03 22:09:26 +03:00
2016-05-11 03:00:44 +07:00

29 lines
823 B
PHP

<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
/**
* Functional tests for the Class Table Inheritance mapping strategy.
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/
class DDC331Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
protected function setUp() {
$this->useModelSet('company');
parent::setUp();
}
/**
* @group DDC-331
*/
public function testSelectFieldOnRootEntity()
{
$q = $this->_em->createQuery('SELECT e.name FROM Doctrine\Tests\Models\Company\CompanyEmployee e');
$this->assertEquals(
strtolower('SELECT c0_.name AS name_0 FROM company_employees c1_ INNER JOIN company_persons c0_ ON c1_.id = c0_.id LEFT JOIN company_managers c2_ ON c1_.id = c2_.id'),
strtolower($q->getSQL())
);
}
}