Commit d0c9d5b5 authored by beberlei's avatar beberlei

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

parent 24802224
......@@ -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 '.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment