1
0
mirror of synced 2024-12-12 22:36:02 +03:00

[2.0] DDC-375 - Added another test-case for an uncovered branch of subselects in DQL

This commit is contained in:
beberlei 2010-02-25 21:04:03 +00:00
parent 248022249f
commit d0c9d5b559

View File

@ -87,6 +87,16 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertEquals("Caramba", $result[0]['brandName']);
}
public function testInSubselect()
{
$dql = "SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p ".
"WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')";
$result = $this->_em->createQuery($dql)->getScalarResult();
$this->assertEquals(1, count($result));
$this->assertEquals('Roman B.', $result[0]['name']);
}
/*public function testGroupByMultipleFields()
{
$dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.