1
0
mirror of synced 2025-03-06 21:06:16 +03:00

Update ExprTest.php

expr()->countDistinct allows to create COUNT(DISTINCT) expression with mulltiple fields but parser requires only one field.

\Doctrine\ORM\Query\Parser::AggregateExpression

some body, please, fix this problem
This commit is contained in:
xoeoro 2015-07-13 10:45:17 +03:00
parent 33c2ae465d
commit 44557a5afa

View File

@ -72,6 +72,11 @@ class ExprTest extends \Doctrine\Tests\OrmTestCase
$this->assertEquals('COUNT(DISTINCT u.id)', (string) $this->_expr->countDistinct('u.id')); $this->assertEquals('COUNT(DISTINCT u.id)', (string) $this->_expr->countDistinct('u.id'));
} }
public function testCountDistinctExprMulti()
{
$this->assertEquals('COUNT(DISTINCT u.id, u.name)', (string) $this->_expr->countDistinct('u.id', 'u.name'));
}
public function testExistsExpr() public function testExistsExpr()
{ {
$qb = $this->_em->createQueryBuilder(); $qb = $this->_em->createQueryBuilder();