From 44557a5afa59e4fc832a98939561c679d6266c54 Mon Sep 17 00:00:00 2001 From: xoeoro Date: Mon, 13 Jul 2015 10:45:17 +0300 Subject: [PATCH] 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 --- tests/Doctrine/Tests/ORM/Query/ExprTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Query/ExprTest.php b/tests/Doctrine/Tests/ORM/Query/ExprTest.php index 91135128c..8343b8da3 100644 --- a/tests/Doctrine/Tests/ORM/Query/ExprTest.php +++ b/tests/Doctrine/Tests/ORM/Query/ExprTest.php @@ -71,6 +71,11 @@ class ExprTest extends \Doctrine\Tests\OrmTestCase { $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() {